Skip to content
Snippets Groups Projects
Commit 348fe105 authored by Morris Jobke's avatar Morris Jobke
Browse files

Merge pull request #14706 from owncloud/ldap-reset-paged-search-on-null-limit

LDAP: set up paged search even if limit is 0
parents 674654c2 42d3ed47
Branches
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment