Skip to content

Commit 5b2a199

Browse files
author
Laurent Marquet
authored
Redirect to login when using confirmation link more than once
As done in #2653, it will solve #2106, #2420 and #2644 and will give a more coherent/convenient way to treat this misuse of activation link
1 parent d2d11e3 commit 5b2a199

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Controller/RegistrationController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ public function checkEmailAction(Request $request)
140140
$user = $this->userManager->findUserByEmail($email);
141141

142142
if (null === $user) {
143-
throw new NotFoundHttpException(sprintf('The user with email "%s" does not exist', $email));
143+
return new RedirectResponse($this->container->get('router')->generate('fos_user_security_login'));
144144
}
145145

146146
return $this->render('@FOSUser/Registration/check_email.html.twig', array(

0 commit comments

Comments
 (0)