From 4aecbb2b5dcb4830d68137f7369aa94ed7cce81f Mon Sep 17 00:00:00 2001 From: Igor V Belousov Date: Sat, 22 Jun 2019 17:38:40 +0300 Subject: [PATCH] fix new user --- src/Controller/UserController.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Controller/UserController.php b/src/Controller/UserController.php index aeede18..cf6ed3e 100644 --- a/src/Controller/UserController.php +++ b/src/Controller/UserController.php @@ -41,6 +41,9 @@ class UserController extends AbstractController $passwordEncoder->encodePassword($user, $user->getPassword()) ); + $user->setActive((bool) $form->get('active')->getData()) + ->setRoles($form->get('roles')->getData()); + $entityManager->persist($user); $entityManager->flush();