Skip to content

Commit

Permalink
allow other listeners to set the redirect
Browse files Browse the repository at this point in the history
after registration confirm
  • Loading branch information
darrylhein authored Aug 9, 2018
1 parent fb1aa1d commit 52159f7
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Listener/RegistrationConfirmListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ public static function getSubscribedEvents()
*/
public function onRegistrationConfirm(GetResponseUserEvent $event)
{
$url = $this->router->generate('fos_user_security_login');
$event->setResponse(new RedirectResponse($url));
if (null === $event->getResponse()) {
$url = $this->router->generate('fos_user_security_login');
$event->setResponse(new RedirectResponse($url));
}
}
}
}

0 comments on commit 52159f7

Please sign in to comment.