change user role

change user role

by michael michael -
Number of replies: 1

Hi,

is there any way i can change role of manual user to be admin cuz we was syncing our moodle site with LDAP and the IT make some changes in the LDAP groups and we cant login to the site, so i have a manual account but i want to change it role to be admin to can fix these issue with it.

Average of ratings: -
In reply to michael michael

Re: change user role

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

You need to edit the database directly. 

1. In the mdl_user table find your manual user and note the number from the 'id' field. 

2. In the mdl_config table find the record where name='siteadmins'

3. Change the value in that record to include the id number you noted earlier. E.g., if the id was 29 then the value will be something like 2,29 (it's a comma separated list of ids)


BTW... don't *ever* make your primary admin have external authentication - always manual.