Skip to content

Commit

Permalink
Update RegistrationController for email when not set
Browse files Browse the repository at this point in the history
  • Loading branch information
jmeyo committed May 23, 2024
1 parent 0aadcc4 commit 67f156d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Controller/RegistrationController.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ public function resendVerifyEmail(
Mailer $mailer,
VerifyEmailHelperInterface $verifyEmailHelper
): Response {

$email = $request->query->get('email', '');

if ($request->isMethod('POST')) {
$email = $request->request->get('email');
$user = $userRepository->findOneBy(['email' => $email]);
Expand All @@ -121,6 +124,8 @@ public function resendVerifyEmail(
$this->addFlash('error', 'authenticate.flash.verifyEmail.emailNotFoundOrAlreadyVerified');
}

return $this->render('@NakaCMS/registration/resend_verify_email.html.twig');
return $this->render('@NakaCMS/registration/resend_verify_email.html.twig', [
'email' => $email,
]);
}
}

0 comments on commit 67f156d

Please sign in to comment.