0

I have 2 user roles in my application: admin and member. After a successful login, an admin user must be redirected to /admin and member must be redirected to /catalog.

Is this possible with Symfony and the FOSUserBundle?

insertusernamehere
  • 23,204
  • 9
  • 87
  • 126
Daniele Dolci
  • 884
  • 1
  • 9
  • 22
  • Possible duplicate of [redirect after login fos user bundle symfony](http://stackoverflow.com/questions/16020508/redirect-after-login-fos-user-bundle-symfony) – insertusernamehere Feb 14 '17 at 13:08

1 Answers1

0

Yes, you can modify the login behaviour. It's nothing FOSUserBundle specific, it's a Symfony feature: https://symfony.com/doc/current/security/form_login.html#always-redirect-to-the-default-page

Another solution is a custom login authentication success handler. You can find an example here: https://gist.github.com/chalasr/69ad35c11e38b8cc717f

flxPeters
  • 1,476
  • 12
  • 21