diff --git a/src/Controller/Public/ResetPasswordController.php b/src/Controller/Public/ResetPasswordController.php index 59ecca2d..a669c272 100644 --- a/src/Controller/Public/ResetPasswordController.php +++ b/src/Controller/Public/ResetPasswordController.php @@ -93,6 +93,7 @@ public function reset(Request $request, UserPasswordHasherInterface $passwordHas } try { + /** @var User */ $user = $this->resetPasswordHelper->validateTokenAndFetchUser($token); } catch (ResetPasswordExceptionInterface $e) { $this->addFlash('reset_password_error', sprintf( @@ -118,6 +119,9 @@ public function reset(Request $request, UserPasswordHasherInterface $passwordHas ); $user->setPassword($encodedPassword); + // If you went through the password reset process, your email is verified + $user->setIsVerified(true); + $this->entityManager->flush(); // The session is cleaned up after the password has been changed.