diff options
author | Arthur Schiwon <blizzz@owncloud.com> | 2014-04-02 21:48:35 +0200 |
---|---|---|
committer | Arthur Schiwon <blizzz@owncloud.com> | 2014-06-02 12:53:55 +0200 |
commit | 5b8ba79356c50934b949a9e2a1942aeddd7640ff (patch) | |
tree | 7dee9aa3e363b21611e4a361d7b0c440f9b32519 /settings/ajax | |
parent | 19fd7cd9c7206cea7c0eba21ed2b5d34ce652429 (diff) | |
download | nextcloud-server-5b8ba79356c50934b949a9e2a1942aeddd7640ff.tar.gz nextcloud-server-5b8ba79356c50934b949a9e2a1942aeddd7640ff.zip |
make filter work on server-side
Diffstat (limited to 'settings/ajax')
-rw-r--r-- | settings/ajax/userlist.php | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/settings/ajax/userlist.php b/settings/ajax/userlist.php index 7ca1d535a46..32237d60b6e 100644 --- a/settings/ajax/userlist.php +++ b/settings/ajax/userlist.php @@ -37,13 +37,18 @@ if (isset($_GET['gid']) && !empty($_GET['gid'])) { } else { $gid = false; } +if (isset($_GET['pattern']) && !empty($_GET['pattern'])) { + $pattern = $_GET['pattern']; +} else { + $pattern = ''; +} $users = array(); $userManager = \OC_User::getManager(); if (OC_User::isAdminUser(OC_User::getUser())) { if($gid !== false) { - $batch = OC_Group::displayNamesInGroup($gid, '', $limit, $offset); + $batch = OC_Group::displayNamesInGroup($gid, $pattern, $limit, $offset); } else { - $batch = OC_User::getDisplayNames('', $limit, $offset); + $batch = OC_User::getDisplayNames($pattern, $limit, $offset); } foreach ($batch as $uid => $displayname) { $user = $userManager->get($uid); @@ -65,7 +70,7 @@ if (OC_User::isAdminUser(OC_User::getUser())) { //don't you try to investigate loops you must not know about $groups = array(); } - $batch = OC_Group::usersInGroups($groups, '', $limit, $offset); + $batch = OC_Group::usersInGroups($groups, $pattern, $limit, $offset); foreach ($batch as $uid) { $user = $userManager->get($uid); $users[] = array( |