]> git.mjollnir.org Git - moodle.git/commitdiff
changed code to use get_role_users function
authortoyomoyo <toyomoyo>
Tue, 12 Sep 2006 07:38:07 +0000 (07:38 +0000)
committertoyomoyo <toyomoyo>
Tue, 12 Sep 2006 07:38:07 +0000 (07:38 +0000)
admin/roles/assign.php

index 92983cbcbdcb55e23cc34bf6a1eeeab7d0bce782..0b5098475ad87f6e728416401e68940764ee66cc 100755 (executable)
 
     $existinguserarray = array();
 
-    $SQL = "select u.* from {$CFG->prefix}role_assignments r, {$CFG->prefix}user u where contextid = $context->id and roleid = $roleid and u.id = r.userid"; // join now so that we can just use fullname() later
-
-    if (!$contextusers = get_records_sql($SQL)) {
+    if (!$contextusers = get_role_users($roleid, $context)) {
         $contextusers = array();  
     }