Skip to content

Commit

Permalink
Merge branch 'MDL-31869_message_search_roles' of git://github.com/and…
Browse files Browse the repository at this point in the history
…yjdavis/moodle
  • Loading branch information
Aparup Banerjee committed Mar 27, 2012
2 parents a7cd1f5 + 186fc53 commit 1cc4412
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion message/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -1503,7 +1503,7 @@ 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, mc.id as contactlistid, mc.blocked
$users = $DB->get_records_sql("SELECT DISTINCT $ufields, mc.id as contactlistid, mc.blocked
FROM {user} u
JOIN {role_assignments} ra ON ra.userid = u.id
LEFT JOIN {message_contacts} mc
Expand Down

0 comments on commit 1cc4412

Please sign in to comment.