Reputation: 506
I got two forms on a view, when the user submit one of the two, I update his role. I look the database, the change is fine.
Unfortunately the php session is already on, I need logout and then login for get the profil actualized.
I mean I got a button that is displayed only when my user got a certain role, but if I changed the role it still displayed while I don't logout/login.
It's possible to refresh the php session ?
Upvotes: 2
Views: 92
Reputation: 506
The Symfony's firewall include a build-in functionallity to solve the problem.
Add this line for app/config/security.yml, under the 'security' propriety:
security:
always_authenticate_before_granting: true
Upvotes: 1