Home
Documentation
Downloads
Demo
Tracker
Development
Translation
Moodle.net
Search
projects
/
moodle.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a2b30aa
)
MDL-31869: Searching for users in messaging with multiple roles generates a warning
author
Tim Lock
<tim.lock@netspot.com.au>
Mon, 5 Mar 2012 01:48:58 +0000
(12:18 +1030)
committer
Andrew Davis
<andrew@moodle.com>
Mon, 19 Mar 2012 02:31:46 +0000
(09:31 +0700)
message/lib.php
patch
|
blob
|
blame
|
history
diff --git
a/message/lib.php
b/message/lib.php
index
c3801e1
..
f1d5d3b
100644
(file)
--- a/
message/lib.php
+++ b/
message/lib.php
@@
-1497,7
+1497,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