diff options
author | blizzz <blizzz@owncloud.com> | 2014-10-17 23:57:00 +0200 |
---|---|---|
committer | blizzz <blizzz@owncloud.com> | 2014-10-17 23:57:00 +0200 |
commit | 2b6281fc9d19f6b516d745386aafc64d3c610668 (patch) | |
tree | 4602ecdd0aaace98c96ca378bb99362ad8a9b0ce /lib | |
parent | 9aa809debf44a5b1f125fe3f32162235230eaae5 (diff) | |
parent | 7ff7a49f3d4913b3165ca7148e089eae8574b27b (diff) | |
download | nextcloud-server-2b6281fc9d19f6b516d745386aafc64d3c610668.tar.gz nextcloud-server-2b6281fc9d19f6b516d745386aafc64d3c610668.zip |
Merge pull request #11494 from owncloud/fix-ldap-ingroup-for-9225-2
fix retrieval of group members and cache group members
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/group/manager.php | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/private/group/manager.php b/lib/private/group/manager.php index 816e7b427f5..417be79ab30 100644 --- a/lib/private/group/manager.php +++ b/lib/private/group/manager.php @@ -223,10 +223,9 @@ class Manager extends PublicEmitter implements IGroupManager { if(!empty($search)) { // only user backends have the capability to do a complex search for users $searchOffset = 0; + $searchLimit = $limit * 100; if($limit === -1) { - $searchLimit = $group->count(''); - } else { - $searchLimit = $limit * 2; + $searchLimit = 500; } do { @@ -237,7 +236,7 @@ class Manager extends PublicEmitter implements IGroupManager { } } $searchOffset += $searchLimit; - } while(count($groupUsers) < $searchLimit+$offset && count($filteredUsers) === $searchLimit); + } while(count($groupUsers) < $searchLimit+$offset && count($filteredUsers) >= $searchLimit); if($limit === -1) { $groupUsers = array_slice($groupUsers, $offset); |