Reputation: 11020
After the users session expired (or logged out) I want to redirect him to a page depending on what the rights of the users have been.
I'm using Symfony 2.1.8-DEV and FOSUserBundle.
I think there has to be a event to attach a listener to, but I didn't found a approbiate listener, neither in symfonys core nor in FOSUserBundle.
Do you have any idea how to achieve this? Is it even possible?
Theoretically there must be a statement where the user gets logged out.
Upvotes: 1
Views: 1831
Reputation: 70416
Actually this has nothing to do with fosuserbundle. You need to register an event handler that listens for requests and check if session has expired.
How to Register Event Listeners and Subscribers http://symfony.com/doc/current/cookbook/doctrine/event_listeners_subscribers.html
This question was already asked here: Catch session timeout Symfony2
Upvotes: 1