02-13-2018, 03:54 PM
I'm not 100{3bc1fe685386cc4c3ab89a3f76566d8931e181ad17f08aed9ad73b30bf28114d} sure that I'm understanding, but I think I get the gist.
There is a file usersc/custom_login_script.php which decides what happens just after someone logs in. I don't know your access levels but let's assume that you have 1 for user, 2 for admin, 3 for your "other" group. The thing you want to think about is that everyone probably has user access 1 so you want to do that last.
You can do something like
Note that hasPerm takes an array so you can do [3,4,5,6,7]
There is a file usersc/custom_login_script.php which decides what happens just after someone logs in. I don't know your access levels but let's assume that you have 1 for user, 2 for admin, 3 for your "other" group. The thing you want to think about is that everyone probably has user access 1 so you want to do that last.
You can do something like
Code:
if(hasPerm([2],$user->data()->id)){
Code:
Redirect::to($us_url_root.'users/admin.php');
Code:
}elseif(hasPerm([3],$user->data()->id)){
Code:
Redirect::to($us_url_root.'users/someotherpage.php');
Code:
}else{
Code:
Redirect::to($us_url_root.'users/account.php');
Code:
}
Note that hasPerm takes an array so you can do [3,4,5,6,7]