summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2017-11-14 23:30:02 +0100
committerGitHub <noreply@github.com>2017-11-14 23:30:02 +0100
commit82502b10db073d1f9466998acbed852dfcb5852c (patch)
tree1ff296fca48161d70818d314d7d0e8495a0d844a /lib/private
parent80e527d21ea6cf408418710f9007e32980a5b4a8 (diff)
parenteb0f3ebf752f07f5dd721b8927514588b8428fc3 (diff)
downloadnextcloud-server-82502b10db073d1f9466998acbed852dfcb5852c.tar.gz
nextcloud-server-82502b10db073d1f9466998acbed852dfcb5852c.zip
Merge pull request #7169 from nextcloud/fix-user-search
Fix search in user managent when no group is selected
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/User/Database.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/private/User/Database.php b/lib/private/User/Database.php
index a835ca3384e..471ff1f45ae 100644
--- a/lib/private/User/Database.php
+++ b/lib/private/User/Database.php
@@ -290,6 +290,8 @@ class Database extends Backend implements IUserBackend {
if ($search !== '') {
$parameters[] = '%' . \OC::$server->getDatabaseConnection()->escapeLikeParameter($search) . '%';
$searchLike = ' WHERE LOWER(`uid`) LIKE LOWER(?)';
+ $parameters[] = '%' . \OC::$server->getDatabaseConnection()->escapeLikeParameter($search) . '%';
+ $searchLike .= ' OR LOWER(`displayname`) LIKE LOWER(?)';
}
$query = \OC_DB::prepare('SELECT `uid` FROM `*PREFIX*users`' . $searchLike . ' ORDER BY LOWER(`uid`) ASC', $limit, $offset);