Hi, I'm trying to display a logout button in the header of the page but only if the user is logged in. Looking at the docs and the UserBundle on github the following code should accomplish that:
{% if is_granted("IS_AUTHENTICATED_REMEMBERED") %} <div style="float:right"><a href="{{ path('_security_logout') }}">logout</a></div> {% endif %} This works as long as I'm logged in but as soon as I hit logout I get the error: "The security context contains no authentication token" Do I have to do something special to make is_granted() work when the user is not logged in? Regards, Dennis -- 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 users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en