From: moodler Date: Wed, 24 Mar 2004 09:38:47 +0000 (+0000) Subject: Primary admin is now the lowest-numbered entry in user_admins, rather than X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=427fdf6669961a1d86238173f54938c62535fdd6;p=moodle.git Primary admin is now the lowest-numbered entry in user_admins, rather than the admin with the lowest userid. This makes it easier to change the primary admin. --- diff --git a/lib/datalib.php b/lib/datalib.php index 87227fb4d6..3a653efea0 100644 --- a/lib/datalib.php +++ b/lib/datalib.php @@ -1037,11 +1037,11 @@ function get_admins() { global $CFG; - return get_records_sql("SELECT u.* + return get_records_sql("SELECT u.*, a.id as adminid FROM {$CFG->prefix}user u, {$CFG->prefix}user_admins a WHERE a.userid = u.id - ORDER BY u.id ASC"); + ORDER BY a.id ASC"); } /**