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.

This thread is closed to new posts. You must sign in to post in the forums.
12/3/2017 7:35:35 PM
Gravatar
Total Posts 8

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 2239

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 8

Re: changing user role from database

Thank you ! It worked perfectlyyes  Mojoportal is amazing.

You must sign in to post in the forums. This thread is closed to new posts.