summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2015-03-09 08:12:25 +0100
committerMorris Jobke <hey@morrisjobke.de>2015-03-09 08:12:25 +0100
commit348fe105b13717757bee4150caa9d3546d6a7666 (patch)
treeaaf21ade1ca428df0d75424f90f2b7fc0227d867 /apps
parent674654c210791dfa86e994080f2a58d1c8486263 (diff)
parent42d3ed47e23724419aeed0df5ccedec6f92ac172 (diff)
downloadnextcloud-server-348fe105b13717757bee4150caa9d3546d6a7666.tar.gz
nextcloud-server-348fe105b13717757bee4150caa9d3546d6a7666.zip
Merge pull request #14706 from owncloud/ldap-reset-paged-search-on-null-limit
LDAP: set up paged search even if limit is 0
Diffstat (limited to 'apps')
-rw-r--r--apps/user_ldap/lib/access.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/apps/user_ldap/lib/access.php b/apps/user_ldap/lib/access.php
index ebd34d5b942..c1b6ebaf1ca 100644
--- a/apps/user_ldap/lib/access.php
+++ b/apps/user_ldap/lib/access.php
@@ -1443,6 +1443,17 @@ class Access extends LDAPUtility implements user\IUserTools {
}
}
+ } else if($this->connection->hasPagedResultSupport && $limit === 0) {
+ // a search without limit was requested. However, if we do use
+ // Paged Search once, we always must do it. This requires us to
+ // initialize it with the configured page size.
+ $this->abandonPagedSearch();
+ // in case someone set it to 0 … use 500, otherwise no results will
+ // be returned.
+ $pageSize = intval($this->connection->ldapPagingSize) > 0 ? intval($this->connection->ldapPagingSize) : 500;
+ $pagedSearchOK = $this->ldap->controlPagedResult(
+ $this->connection->getConnectionResource(), $pageSize, false, ''
+ );
}
return $pagedSearchOK;