diff --git a/src/Controller/UserController.php b/src/Controller/UserController.php index 4122df2fe82ed101706283188df40847e2320c6f..edb2f9068b6ad615bdcc20f83480728f26751fe5 100755 --- a/src/Controller/UserController.php +++ b/src/Controller/UserController.php @@ -104,6 +104,9 @@ class UserController extends AbstractController ]); } + $this->entity_manager->persist($current_user); + $this->entity_manager->flush(); + $this->addFlash( 'success', $this->translator->trans('user.profile.updated.success') @@ -112,9 +115,6 @@ class UserController extends AbstractController return $this->redirectToRoute('show_profile'); } - $this->entity_manager->persist($current_user); - $this->entity_manager->flush(); - return $this->renderForm('user/edit_profile.html.twig', [ 'editUserProfileForm' => $form ]);