From c2004a795254f31492cd3c9fa341d288a9cdb9e4 Mon Sep 17 00:00:00 2001 From: Tim Hunt Date: Thu, 4 Oct 2012 11:43:33 +0100 Subject: [PATCH] MDL-34657 user sort: exact match logic should be case-insensitive. --- lib/datalib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/datalib.php b/lib/datalib.php index 2167d665762..4e47268c417 100644 --- a/lib/datalib.php +++ b/lib/datalib.php @@ -252,7 +252,7 @@ function users_order_by_sql($usertablealias = '', $search = null, context $conte $fieldstocheck = array_merge(array('firstname', 'lastname'), get_extra_user_fields($context)); foreach ($fieldstocheck as $key => $field) { - $exactconditions[] = $tableprefix . $field . ' = :' . $paramkey; + $exactconditions[] = 'LOWER(' . $tableprefix . $field . ') = LOWER(:' . $paramkey . ')'; $params[$paramkey] = $search; $paramkey++; }