From 52159f7833dc342d12db42bb21bb26a05a2ad971 Mon Sep 17 00:00:00 2001 From: Darryl Hein Date: Thu, 9 Aug 2018 17:36:01 -0600 Subject: [PATCH] allow other listeners to set the redirect after registration confirm --- Listener/RegistrationConfirmListener.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Listener/RegistrationConfirmListener.php b/Listener/RegistrationConfirmListener.php index e9ea9ab..7e2b2ae 100755 --- a/Listener/RegistrationConfirmListener.php +++ b/Listener/RegistrationConfirmListener.php @@ -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)); + } } -} \ No newline at end of file +}