I am working on a symfony2 website ,
I have many companies in database , every company should have his own login page and a dashboard like this :
www.site.com/company1/login ==> www.site.com/company1/dashboard
www.site.com/company2/login ==> www.site.com/company2/dashboard
Question 1 : how can I edit the login function to check if this user is in the companyx before to redirect him ?
Question 2 : After authentication in namecompany/login
, how it can be automatically redirected to /namecompany/dashboard
?
Thank you