src/PHPDish/Bundle/UserBundle/EventListener/UserSubscriber.php
public function onRegisterSuccess(FormEvent $event)
    {
        $user = $event->getForm()->getData();
        $response = new RedirectResponse($this->router->generate('user_view', [
            'username' => $user->getUsername(),
        ]));
        $event->setResponse($response);
    }
public function onRegisterSuccess(FormEvent $event)
    {
        $user = $event->getForm()->getData();
        $response = new RedirectResponse($this->router->generate('user_view', [
            'username' => $user->getUsername(),
        ]));
        $event->setResponse($response);
    }
注册监听完成

@param FormEvent $event