]> git.mjollnir.org Git - moodle.git/commitdiff
Primary admin is now the lowest-numbered entry in user_admins, rather than
authormoodler <moodler>
Wed, 24 Mar 2004 09:38:47 +0000 (09:38 +0000)
committermoodler <moodler>
Wed, 24 Mar 2004 09:38:47 +0000 (09:38 +0000)
the admin with the lowest userid.  This makes it easier to change the
primary admin.

lib/datalib.php

index 87227fb4d651de4af2d656abe81fa01a572a884b..3a653efea016e521b8175d515232e371f9c42e28 100644 (file)
@@ -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");
 }
 
 /**