For this purpose there is the GetResponseUserEvent
at the REGISTRATION_CONFIRM
event, which asks for a response:
public static function getSubscribedEvents()
{
return array(
FOSUserEvents::REGISTRATION_CONFIRM => 'onRegistrationConfirm',
);
}
public function onRegistrationConfirm(GetResponseUserEvent $event)
{
$url = $this->router->generate('my_route', array('foo' => 'bar'));
$response = new RedirectResponse($url);
$event->setResponse(new RedirectResponse($url));
}