I use this in my navbar on my web site
{{ render(controller('FOSUserBundle:Security:login')) }}
And i put the login form in my navbar where my login work when i put the correct data into.. my problem come when the data is incorrect because the render redirect me on the login.html.twig page for say me the error message. I think my problem is in this lines
protected function renderLogin(array $data)
{
return $this->render('FOSUserBundle:Security:login.html.twig', $data);
}
I try to change this, with the initial page or the directory of navbar but is not the good way..
How can i do??? I want the error message in the index and I do not want to redirect the login page..