Which database table contains the list of site administrators?

Which database table contains the list of site administrators?

by Mark Thornton -
Number of replies: 2

On a test Moodle system, which is a close copy of our live system, I want to restrict access to only the users who have Site Administrator role in the live system.  I am trying to do this by writing a SQL script to set Suspended = 1 to all the accounts in the mdl_user table, with the exception of those that have the Site Administrator role.

Which table holds the list of Site Adminstrators?  I have been looking for some time, but cannot find it.

Average of ratings: -
In reply to Mark Thornton

Re: Which database table contains the list of site administrators?

by Tomasz Muras -
Picture of Core developers Picture of Plugin developers Picture of Plugins guardians Picture of Translators

Hi Mark,

mdl_config:

SELECT * from mdl_config WHERE name='siteadmins';

cheers,
Tomek

Average of ratings: Useful (2)
In reply to Tomasz Muras

Re: Which database table contains the list of site administrators?

by Mark Thornton -

Dear Tomasz,

Thank you SO much - I woul dnever have guessed to look there in a million years!

Best wishes

Mark Thornton