From dbaebc53b0267f526dc0d59275292f8d129b27c4 Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Wed, 22 Mar 2017 17:11:09 -0600 Subject: fix sorting in the backend Signed-off-by: Morris Jobke --- lib/private/User/Database.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/private/User/Database.php') diff --git a/lib/private/User/Database.php b/lib/private/User/Database.php index a281572ad55..dfbd995fb2e 100644 --- a/lib/private/User/Database.php +++ b/lib/private/User/Database.php @@ -193,7 +193,7 @@ class Database extends Backend implements IUserBackend { $displayNames = array(); $query = \OC_DB::prepare('SELECT `uid`, `displayname` FROM `*PREFIX*users`' - . $searchLike .' ORDER BY `uid` ASC', $limit, $offset); + . $searchLike .' ORDER BY LOWER(`displayname`), LOWER(`uid`) ASC', $limit, $offset); $result = $query->execute($parameters); while ($row = $result->fetchRow()) { $displayNames[$row['uid']] = $row['displayname']; @@ -279,7 +279,7 @@ class Database extends Backend implements IUserBackend { $searchLike = ' WHERE LOWER(`uid`) LIKE LOWER(?)'; } - $query = \OC_DB::prepare('SELECT `uid` FROM `*PREFIX*users`' . $searchLike . ' ORDER BY `uid` ASC', $limit, $offset); + $query = \OC_DB::prepare('SELECT `uid` FROM `*PREFIX*users`' . $searchLike . ' ORDER BY LOWER(`uid`) ASC', $limit, $offset); $result = $query->execute($parameters); $users = array(); while ($row = $result->fetchRow()) { -- cgit v1.2.3