summaryrefslogtreecommitdiffstats
path: root/lib/private/User
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2017-11-14 17:32:03 +0100
committerMorris Jobke <hey@morrisjobke.de>2017-11-14 17:32:03 +0100
commiteb0f3ebf752f07f5dd721b8927514588b8428fc3 (patch)
tree0b2a83cebf62bf031f7bc2f86a0465680fc363c5 /lib/private/User
parent6d1d2dde0b56b8cc16855599628493bd5cfc9c4d (diff)
downloadnextcloud-server-eb0f3ebf752f07f5dd721b8927514588b8428fc3.tar.gz
nextcloud-server-eb0f3ebf752f07f5dd721b8927514588b8428fc3.zip
Fix search in user managent when no group is selected
* also allows to search by displayname Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'lib/private/User')
-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);