mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
message MDL-26607 fixed sql error when searching for users and limiting search to your courses
This commit is contained in:
parent
2b37004c28
commit
b6e526585a
@ -1442,8 +1442,8 @@ function message_search_users($courseid, $searchtext, $sort='', $exceptions='')
|
||||
|
||||
// everyone who has a role assignment in this course or higher
|
||||
$params = array($USER->id, "%$searchtext%");
|
||||
$users = $DB->get_records_sql("SELECT $ufields,
|
||||
FROM {user} u, mc.id as contactlistid, mc.blocked
|
||||
$users = $DB->get_records_sql("SELECT $ufields, mc.id as contactlistid, mc.blocked
|
||||
FROM {user} u
|
||||
JOIN {role_assignments} ra ON ra.userid = u.id
|
||||
LEFT JOIN {message_contacts} mc
|
||||
ON mc.contactid = u.id AND mc.userid = ?
|
||||
|
Loading…
x
Reference in New Issue
Block a user