mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 17:06:53 +02:00
changed code to use get_role_users function
This commit is contained in:
parent
ab5c904411
commit
87e5a0cd9e
1 changed files with 1 additions and 3 deletions
|
@ -123,9 +123,7 @@
|
||||||
|
|
||||||
$existinguserarray = array();
|
$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_role_users($roleid, $context)) {
|
||||||
|
|
||||||
if (!$contextusers = get_records_sql($SQL)) {
|
|
||||||
$contextusers = array();
|
$contextusers = array();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue