diff --git a/Controller/UserController.php b/Controller/UserController.php index c9ce86f..80bb7f0 100644 --- a/Controller/UserController.php +++ b/Controller/UserController.php @@ -15,6 +15,7 @@ use DateTime; use DateTimeZone; +use Doctrine\Persistence\ManagerRegistry; use Exception; use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; use Symfony\Component\HttpFoundation\RedirectResponse; @@ -181,6 +182,7 @@ private function renderDocument(string $documentName, string $activeFlagKey, str */ public function acceptPolicies( Request $request, + ManagerRegistry $doctrine, CurrentUserApiInterface $currentUserApi, UserRepositoryInterface $userRepository, AccessHelper $accessHelper, @@ -226,7 +228,7 @@ public function acceptPolicies( $userEntity->delAttribute($acceptedVar); } } - $this->getDoctrine()->getManager()->flush(); + $doctrine->getManager()->flush(); if ($data['acceptedpolicies_policies'] && $data['login']) { $accessHelper->login($userEntity);