From 14c0138bf34a20695b23aaad2e4a5d4902e7bb1e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Gertz?= Date: Wed, 28 Jul 2021 09:39:00 +0200 Subject: [PATCH] Add Civility::class to avoid strange error when editing user account --- Controller/UserController.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Controller/UserController.php b/Controller/UserController.php index dcd448b..963f538 100644 --- a/Controller/UserController.php +++ b/Controller/UserController.php @@ -6,11 +6,13 @@ use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Routing\RequestContext; use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken; -use Rapsys\AirBundle\Entity\Slot; -use Rapsys\AirBundle\Entity\Session; + +use Rapsys\AirBundle\Entity\Civility; use Rapsys\AirBundle\Entity\Location; -use Rapsys\AirBundle\Entity\User; +use Rapsys\AirBundle\Entity\Session; +use Rapsys\AirBundle\Entity\Slot; use Rapsys\AirBundle\Entity\Snippet; +use Rapsys\AirBundle\Entity\User; class UserController extends DefaultController { /** @@ -147,6 +149,8 @@ class UserController extends DefaultController { 'action' => $this->generateUrl('rapsys_air_user_view', ['id' => $id]), //Set the form attribute 'attr' => [ 'class' => 'col' ], + //Set civility class + 'class_civility' => Civility::class, //Disable mail 'mail' => $this->isGranted('ROLE_ADMIN'), //Disable password -- 2.41.1