Commit 76c97735 authored by Julien Fastré's avatar Julien Fastré

handle multiple person in privacy logs

parent 42e33c02
...@@ -25,6 +25,7 @@ namespace Chill\PersonBundle\Privacy; ...@@ -25,6 +25,7 @@ namespace Chill\PersonBundle\Privacy;
use Psr\Log\LoggerInterface; use Psr\Log\LoggerInterface;
use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
use Chill\PersonBundle\Entity\Person;
class PrivacyEventSubscriber implements EventSubscriberInterface class PrivacyEventSubscriber implements EventSubscriberInterface
{ {
...@@ -74,7 +75,10 @@ class PrivacyEventSubscriber implements EventSubscriberInterface ...@@ -74,7 +75,10 @@ class PrivacyEventSubscriber implements EventSubscriberInterface
); );
if ($event->hasPersons()) { if ($event->hasPersons()) {
$involved['persons'] = $event->getPersons(); $involved['persons'] = \array_map(
function(Person $p) { return $p->getId(); },
$event->getPersons()
);
} }
$this->logger->notice( $this->logger->notice(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment