diff --git a/src/Controller/RegistrationController.php b/src/Controller/RegistrationController.php index f349e7a526aab581d4a84db960f09cbb3ceb22c3..8738dd851eb6b318ba95a14b21aa0e751d22ee0e 100644 --- a/src/Controller/RegistrationController.php +++ b/src/Controller/RegistrationController.php @@ -103,7 +103,7 @@ class RegistrationController extends AbstractController // @TODO Change the redirect on success and handle or remove the flash message in your templates $this->addFlash('success', 'Your email address has been verified.'); - return $this->redirectToRoute('app_register'); + return $this->redirectToRoute('app_login'); } /** diff --git a/templates/registration/register.html.twig b/templates/registration/register.html.twig index c2d1417baa1474bd637c1b94de882f5e06c80765..dccd0cfe34fab306796de22196bfbed84499082b 100644 --- a/templates/registration/register.html.twig +++ b/templates/registration/register.html.twig @@ -6,13 +6,6 @@ {% for flashError in app.flashes('verify_email_error') %} <div class="alert alert-danger col-6 mx-auto my-5 h1" role="alert">{{ flashError }}</div> {% endfor %} - {% for flashMessage in app.flashes('success') %} - <div class="alert alert-warning col-6 mx-auto my-5 h1" role="alert" >{{ flashMessage }}</div> - {% endfor %} - <div> - - </div> - {{ form_start(registrationForm, {'attr': {'class': 'd-flex flex-column justify-content-center'}}) }} {{ form_row(registrationForm.firstName) }} diff --git a/templates/security/login.html.twig b/templates/security/login.html.twig index 7490fa36c073171286f44a916bd578b23f866ad1..3c78306729bfe2f4dc00b017e787b463186cd975 100644 --- a/templates/security/login.html.twig +++ b/templates/security/login.html.twig @@ -7,6 +7,9 @@ {% if error %} <div class="alert alert-danger">{{ error.messageKey|trans(error.messageData, 'security') }}</div> {% endif %} + {% for flashMessage in app.flashes('success') %} + <div class="alert alert-warning col-6" role="alert" >{{ flashMessage }}</div> + {% endfor %} {% if app.user %} <div class="mb-3">