diff --git a/src/Bundle/ChillPersonBundle/Controller/PersonController.php b/src/Bundle/ChillPersonBundle/Controller/PersonController.php index 4698373f1..97d568f58 100644 --- a/src/Bundle/ChillPersonBundle/Controller/PersonController.php +++ b/src/Bundle/ChillPersonBundle/Controller/PersonController.php @@ -11,6 +11,8 @@ declare(strict_types=1); namespace Chill\PersonBundle\Controller; +use Chill\MainBundle\Audit\AuditEvent; +use Chill\MainBundle\Entity\AuditTrail; use Chill\MainBundle\Security\Authorization\AuthorizationHelperInterface; use Chill\PersonBundle\Config\ConfigPersonAltNamesHelper; use Chill\PersonBundle\Entity\Household\Household; @@ -204,8 +206,7 @@ final class PersonController extends AbstractController 'You are not allowed to see this person.' ); - $event = new PrivacyEvent($person); - $this->eventDispatcher->dispatch($event, PrivacyEvent::PERSON_PRIVACY_EVENT); + $this->eventDispatcher->dispatch(new AuditEvent(AuditTrail::AUDIT_VIEW, [$person])); return $this->render( '@ChillPerson/Person/view.html.twig',