handle multiple person in privacy logs

This commit is contained in:
Julien Fastré 2018-10-19 14:17:49 +02:00
parent 943cd9f31e
commit c392fad540

View File

@ -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(