In Symfony2 and FOSUserBundle override login_check

At the moment when the user is authenticated, I need to check his role in order to redirect him to the correct page (two different pages for two different roles).

I did not find in the documentation how to redefine login_check. Directly from the package, it uses the security.yml proxy server to tell the engine to go to one unique page by default. Any clue?

The same problem to exit the system.

+4
source share
1 answer

If you understand correctly, do you want to redirect the newly registered user / logged out user to the appropriate route depending on its role?

Here is a textbook on forwarding on entry / exit using form handlers.

+7
source

All Articles