]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-10929:
authorthepurpleblob <thepurpleblob>
Tue, 21 Aug 2007 10:36:46 +0000 (10:36 +0000)
committerthepurpleblob <thepurpleblob>
Tue, 21 Aug 2007 10:36:46 +0000 (10:36 +0000)
User search will now additionally return users based on an exact match
to their username.

lib/datalib.php

index ffc76f72beba6d73d1ee6c406b4c03c3e442aa38..f91484e1a57d4d3fc64b603a5a9c94e003cd46e3 100644 (file)
@@ -284,7 +284,7 @@ function get_users_listing($sort='lastaccess', $dir='ASC', $page=0, $recordsperp
 
     if (!empty($search)) {
         $search = trim($search);
-        $select .= " AND ($fullname $LIKE '%$search%' OR email $LIKE '%$search%') ";
+        $select .= " AND ($fullname $LIKE '%$search%' OR email $LIKE '%$search%' OR username='$search') ";
     }
 
     if ($firstinitial) {