Skip to content

Commit

Permalink
message MDL-26607 fixed sql error when searching for users and limiti…
Browse files Browse the repository at this point in the history
…ng search to your courses
  • Loading branch information
andyjdavis committed Mar 16, 2011
1 parent 2b37004 commit b6e5265
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions message/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ?
Expand Down

0 comments on commit b6e5265

Please sign in to comment.