From ee17d8482fcd657fc82481bab51c22945e7bbe29 Mon Sep 17 00:00:00 2001 From: Axel Guckelsberger Date: Thu, 2 Dec 2021 12:53:15 +0100 Subject: [PATCH] remove deprecated usage of getDoctrine() method --- Controller/UserController.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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);