Hello. I make loginAction: public function loginAction() { if ($this->get('request')->attributes- >has(SecurityContext::AUTHENTICATION_ERROR)) { $error = $this->get('request')->attributes- >get(SecurityContext::AUTHENTICATION_ERROR); } else { $error = $this->get('request')->getSession()- >get(SecurityContext::AUTHENTICATION_ERROR); }
return $this->render('AidfConaBundle:Secured:login.html.twig', array( 'last_username' => $this->get('request') ->getSession() ->get(SecurityContext::LAST_USERNAME), 'error' => $error )); } In security.yml I set to: logout: path: /logout target: /index invalidate_session: true delete_cookies: ~ Then I make a logout button: <a id="wylogowanie" class="top wyloguj" href="{{path('logout')}}" title="Wyloguj sie">Logout</a> How you see i render to /logout so in my routing I create route for logout logout: pattern: /logout So when I click on Logout I`m rendered to /logout and after that to / index. Everything must work. Unfortunately I`m still login :( I try to make a logoutAction in my Security Controller public function logoutAction() { $this->get('request')->getSession()->invalidate(); } routing.yml: logout: pattern: /logout defaults: { _controller:AidfConaBundle:Secured:logout} But after this I have the same problem. I`m rendered to /logout/ after this to /index And I must be logout but I`m not Do you have any Idea why? And how I can fixed this? -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony developers" group. To post to this group, send email to symfony-devs@googlegroups.com To unsubscribe from this group, send email to symfony-devs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-devs?hl=en