106
|
Warning: Checking for
'IS_AUTHENTICATED_FULLY' alone will return false if the user has logged in using "Remember me" functionality.
According to Symfony 2 documentation, there are 3 possibilities:
Those roles represent three levels of authentication:
I ran into an issue where users of our system that had used "Remember Me" functionality were being treated as if they had not logged in at all on pages that only checked for
'IS_AUTHENTICATED_FULLY' .
The answer then is to require them to re-login if they are not authenticated fully, or to check for the remembered role:
Hopefully, this will save someone out there from making the same mistake I made. I used this very post as a reference when looking up how to check if someone was logged in or not on Symfony 2.
|
Development, Software, Hardware, System, Network, API, WebService, Programmation and co..
Friday, July 29, 2016
How to check if an user is logged in Symfony2 inside a controller?
Labels:
symfony
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment