How to get the current registered user on unprotected pages?
I only have / account / page that is protected through the firewall and other pages are insecure.
My global navigation has the following template (simplified):
{% if app.user %} <a href="/account/data">... <a href="/logout>... {% else %} <a href="/account/login">.... {% endif %}
Problem. Navigation with an exit link should also be available on an insecure page, but there is no UsernamePasswordToken ... and symfony displays a login link, not the / logout and / account / data links. I configured all the other pages with an anonymous listener, but it does not work properly.
is there a solution for it?
source share