Blue
White
Purple
Green
Red
Orange
Blue Light
White Light
Purple Light
Green Light
Red Light
Orange Light
I am trying to find the best way to redirect user based on his security group ( dynamic permissions ) to a certain dashboard.
Is the best way to use sessions and add a group_id for each user in my users table or will the Security API take care of this?
I am trying to have a dashboard for each security group , example Admin, Sales, Management, etc.....
The easiest option for you is to use AfterSuccessfulLogin event and redirect user to one of dashboards based on their group name.
Sample code:
if (Security::getUserGroup()=="admin") {header("Location: dashboard1_dashboard.php");exit();}