fosuserbundle override login action
I am using FSOUserBundle and I want to override loginAction, I used this method: namespace PjDZ\UserBundle\Controller; use FOS\UserBundle\Controller\SecurityController as BaseController; class SecurityController extends BaseController { public function loginAction(\Symfony\Component\HttpFoundation\Request $request) { /** @var $session \Symfony\Component\HttpFoundation\Session\Session */ $session = $request->getSession(); // get the error if any (works with forward and redirect -- see below) if ($request->attributes->has(SecurityContext::AUTHENTICATION_ERROR)) { $error = $request->attributes-