aboutsummaryrefslogtreecommitdiffstats
path: root/apps/user_ldap/lib
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2023-05-25 11:31:29 +0200
committerCôme Chilliet <come.chilliet@nextcloud.com>2023-05-25 11:31:29 +0200
commitb186cffdbe26ea3390e9ff35071b36a81f57c033 (patch)
treee4dd1544da04908689af17c5e2684d9926f1bb61 /apps/user_ldap/lib
parentb313e2a507776141c320af06bd3369e188bc59b8 (diff)
downloadnextcloud-server-b186cffdbe26ea3390e9ff35071b36a81f57c033.tar.gz
nextcloud-server-b186cffdbe26ea3390e9ff35071b36a81f57c033.zip
Use default page size for jumping to desired offset
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'apps/user_ldap/lib')
-rw-r--r--apps/user_ldap/lib/Access.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/user_ldap/lib/Access.php b/apps/user_ldap/lib/Access.php
index 3f120caefe6..a6c48f383d2 100644
--- a/apps/user_ldap/lib/Access.php
+++ b/apps/user_ldap/lib/Access.php
@@ -1993,8 +1993,9 @@ class Access extends LDAPUtility {
// no cookie known from a potential previous search. We need
// to start from 0 to come to the desired page. cookie value
// of '0' is valid, because 389ds
- $reOffset = ($offset - $pageSize) < 0 ? 0 : $offset - $pageSize;
- $this->search($filter, $base, $attr, $pageSize, $reOffset, true);
+ $defaultPageSize = (int)$this->connection->ldapPagingSize;
+ $reOffset = ($offset - $defaultPageSize) < 0 ? 0 : $offset - $defaultPageSize;
+ $this->search($filter, $base, $attr, $defaultPageSize, $reOffset, true);
if (!$this->hasMoreResults()) {
// when the cookie is reset with != 0 offset, there are no further
// results, so stop.