Page 1 of 1

About Roles Admin

Posted: Fri Apr 24, 2020 2:53 pm
by tavitooo
I have a small web page and I want to know how according to the type of user it sent to one page and if it is another user go to another specific page. And in the administrator module is possible create more users assigned to a specific page.
For example, in Log In, when an user enters with an account, they should go to a page specified according to the type of user.

For example In my page called: "listado.php" I add "User Redirect" and it redirect with a specific user!! but what happen when create an new user?. because with user "vendedor" it go to page "vesti_visual" but if is a new user how to add other user in this secction "Redirect Rules"?.
Image


In this section I think is ok I used a Role only access users with roles "Por Mayor".
Image

But in this section Log in How do redirect an user depending on their role?.
Image

Also is there a way to create modify new super administrators?

Any tutorial about roles?.

Thanks

Re: About Roles Admin

Posted: Fri Apr 24, 2020 3:37 pm
by Pablo
With the 'User redirect' you can redirect users to a specific page.
This object is usually on the 'destination page' as configured in the login form.

Re: About Roles Admin

Posted: Fri Apr 24, 2020 3:53 pm
by tavitooo
Yes in the page "User redirect" instead of "username" I changed it to "role" and now is working and now I can create new users with a specific role and it redirect automatic an specific page:

if ($_SESSION['role'] == 'Por Menor')
{
header('Location: ./users/vesti_visual.php');
exit;
}
if ($_SESSION['role'] == 'PorMayor')
{
header('Location: ./users/vesti_mayor.php');
exit;
}

Re: About Roles Admin

Posted: Fri Apr 24, 2020 5:13 pm
by Pablo
In the 'protected page' object you can select whihc users roles are allowed for the page.