summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap/lib/access.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/user_ldap/lib/access.php')
-rw-r--r--apps/user_ldap/lib/access.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/user_ldap/lib/access.php b/apps/user_ldap/lib/access.php
index f3657176f70..0fb968cebe7 100644
--- a/apps/user_ldap/lib/access.php
+++ b/apps/user_ldap/lib/access.php
@@ -149,7 +149,11 @@ class Access extends LDAPUtility implements user\IUserTools {
$this->abandonPagedSearch();
// openLDAP requires that we init a new Paged Search. Not needed by AD,
// but does not hurt either.
- $this->initPagedSearch($filter, array($dn), array($attr), 1, 0);
+ $pagingSize = intval($this->connection->ldapPagingSize);
+ // 0 won't result in replies, small numbers may leave out groups
+ // (cf. #12306), 500 is default for paging and should work everywhere.
+ $maxResults = $pagingSize < 20 ? $pagingSize : 500;
+ $this->initPagedSearch($filter, array($dn), array($attr), $maxResults, 0);
$dn = $this->DNasBaseParameter($dn);
$rr = @$this->ldap->read($cr, $dn, $filter, array($attr));
if(!$this->ldap->isResource($rr)) {