]> git.mjollnir.org Git - moodle.git/commitdiff
Don't rely on the legacy capabilities to identify admins, use doanything
authormoodler <moodler>
Sun, 17 Sep 2006 16:00:16 +0000 (16:00 +0000)
committermoodler <moodler>
Sun, 17 Sep 2006 16:00:16 +0000 (16:00 +0000)
lib/datalib.php

index 338f9ff15a3ff8060fbfc0cfd91fccd019325ac6..2b8cea1315d1de07f5a7e151a9b7e2f046ca0c62 100644 (file)
@@ -65,7 +65,7 @@ function get_admins() {
     
     $context = get_context_instance(CONTEXT_SYSTEM, SITEID);
 
-    return get_users_by_capability($context, 'moodle/legacy:admin', 'u.*, ra.id as adminid', 'ra.id ASC'); // only need first one
+    return get_users_by_capability($context, 'moodle/site:doanything', 'u.*, ra.id as adminid', 'ra.id ASC'); // only need first one
                              
 }
 
@@ -1540,4 +1540,4 @@ function category_parent_visible($parent = 0) {
 }
 
 // vim:autoindent:expandtab:shiftwidth=4:tabstop=4:tw=140:
-?>
\ No newline at end of file
+?>