From c392fad540bd67fb4b330e6e146c0553550ba4d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Fri, 19 Oct 2018 14:17:49 +0200 Subject: [PATCH] handle multiple person in privacy logs --- Privacy/PrivacyEventSubscriber.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Privacy/PrivacyEventSubscriber.php b/Privacy/PrivacyEventSubscriber.php index 9af711ed9..b6cc50e54 100644 --- a/Privacy/PrivacyEventSubscriber.php +++ b/Privacy/PrivacyEventSubscriber.php @@ -25,6 +25,7 @@ namespace Chill\PersonBundle\Privacy; use Psr\Log\LoggerInterface; use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; +use Chill\PersonBundle\Entity\Person; class PrivacyEventSubscriber implements EventSubscriberInterface { @@ -74,7 +75,10 @@ class PrivacyEventSubscriber implements EventSubscriberInterface ); if ($event->hasPersons()) { - $involved['persons'] = $event->getPersons(); + $involved['persons'] = \array_map( + function(Person $p) { return $p->getId(); }, + $event->getPersons() + ); } $this->logger->notice(