summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap
diff options
context:
space:
mode:
Diffstat (limited to 'apps/user_ldap')
-rw-r--r--apps/user_ldap/group_ldap.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/user_ldap/group_ldap.php b/apps/user_ldap/group_ldap.php
index 861636a763f..7efbc025ba8 100644
--- a/apps/user_ldap/group_ldap.php
+++ b/apps/user_ldap/group_ldap.php
@@ -344,7 +344,6 @@ class GROUP_LDAP extends BackendUtility implements \OCP\GroupInterface {
* (active directory has a limit of 1000 by default)
*/
public function getGroups($search = '', $limit = -1, $offset = 0) {
- $max_groups = 100000; // limit max results (just for safety reasons)
if(!$this->enabled) {
return array();
}
@@ -353,10 +352,11 @@ class GROUP_LDAP extends BackendUtility implements \OCP\GroupInterface {
|| empty($pagingsize)) {
return $this->getGroupsChunk($search, $limit, $offset);
}
+ $max_groups = 100000; // limit max results (just for safety reasons)
if ($limit > -1) {
- $overall_limit = min($limit, 100000);
+ $overall_limit = min($limit, $max_groups);
} else {
- $overall_limit = 100000;
+ $overall_limit = $max_groups;
}
$chunk_offset = $offset;
$all_groups = array();