summaryrefslogtreecommitdiffstats
path: root/lib/private/User/Database.php
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2017-03-22 17:11:09 -0600
committerMorris Jobke <hey@morrisjobke.de>2017-03-23 15:41:25 -0600
commitdbaebc53b0267f526dc0d59275292f8d129b27c4 (patch)
treea155a598866d41029dd175c34096aad51e7318f6 /lib/private/User/Database.php
parent31fa2f73d4089630b158d23f765db3a675b77683 (diff)
downloadnextcloud-server-dbaebc53b0267f526dc0d59275292f8d129b27c4.tar.gz
nextcloud-server-dbaebc53b0267f526dc0d59275292f8d129b27c4.zip
fix sorting in the backend
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'lib/private/User/Database.php')
-rw-r--r--lib/private/User/Database.php4
1 files changed, 2 insertions, 2 deletions
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()) {