$tok = new UserToken($user->getEmail()); $this->get('security.context')->setToken($tok); //throw new \Exception(); return new RedirectResponse($this->generateUrl('welcome'));