Skip to content

Commit 070c860

Browse files
author
Benjamin B
committed
Redirect to login when using confirmation token if not found or already used
1 parent dc4a927 commit 070c860

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
@@ -139,7 +139,7 @@ public function confirmAction(Request $request, $token)
139139
$user = $userManager->findUserByConfirmationToken($token);
140140

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

145145
$user->setConfirmationToken(null);

0 commit comments

Comments
 (0)