changing user role from database

If you have questions about using mojoPortal, you can post them here.

You may want to first review our site administration documentation to see if your question is answered there.

12/3/2017 7:35:35 PM
Gravatar
Total Posts 3

changing user role from database

Hi.

I couldnt find relevant topic for my problem ... 

How to change user role to "admin " from database?

Thanks

 

12/5/2017 10:09:26 AM
Gravatar
Total Posts 1992

Re: changing user role from database

Hi,

  1. Get the UserID and UserGuid for the user you want to put in the admin role. To do this, look at the mp_Users table.
  2. Get the RoleGuid for the Admin role. To do this, look at the mp_Roles table.
  3. Using the information you gathered in steps 1 and 2, run this statement: INSERT INTO mp_UserRoles (UserID, RoleID, UserGuid, RoleGuid) VALUES (<UserID from Step 1>, 1, <UserGuid from Step 1>, <RoleGuid from Step 1>);

This should get you set.

Thanks,
Joe

12/5/2017 11:43:02 AM
Gravatar
Total Posts 3

Re: changing user role from database

Thank you ! It worked perfectlyyes  Mojoportal is amazing.