I am new to Symfony2. I am trying to use FOSUserBundle for user authentication.
Is it possible to use single FOSUserBundle for admin as well as front end section? If yes, then what changes i will need to make at script level?
What i want is:
1. if i access url http://localhost/symfony/admin/ then i should be redirected to http://localhost/symfony/admin/login if admin is not logged in and after successful login, i should be redirected to http://localhost/symfony/admin/
2. if i access url http://localhost/symfony/profile/ then i should be redirected to http://localhost/symfony/login if user is not logged in and after successful login, i should be redirected to http://localhost/symfony/profile/.
By default FOSUserBundle create user as administrator. So what change need to place in to let bundle create user role for front end automatically and admin role for admin section.