Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

Commit

Permalink
remove deprecated usage of getDoctrine() method
Browse files Browse the repository at this point in the history
  • Loading branch information
Guite committed Dec 2, 2021
1 parent 382ef29 commit ee17d84
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Controller/UserController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit ee17d84

Please sign in to comment.