diff --git a/apps/user_ldap/lib/configuration.php b/apps/user_ldap/lib/configuration.php index daec2bed13..418a2bfc01 100644 --- a/apps/user_ldap/lib/configuration.php +++ b/apps/user_ldap/lib/configuration.php @@ -28,6 +28,9 @@ namespace OCA\user_ldap\lib; +/** + * @property int ldapPagingSize holds an integer + */ class Configuration { protected $configPrefix = null; diff --git a/apps/user_ldap/lib/connection.php b/apps/user_ldap/lib/connection.php index c485ac7439..53c9b3790a 100644 --- a/apps/user_ldap/lib/connection.php +++ b/apps/user_ldap/lib/connection.php @@ -85,11 +85,12 @@ class Connection extends LDAPUtility { if($memcache->isAvailable()) { $this->cache = $memcache->create(); } - $this->hasPagedResultSupport = - $this->ldap->hasPagedResultSupport(); $helper = new Helper(); $this->doNotValidate = !in_array($this->configPrefix, $helper->getServerConfigurationPrefixes()); + $this->hasPagedResultSupport = + intval($this->configuration->ldapPagingSize) !== 0 + || $this->ldap->hasPagedResultSupport(); } public function __destruct() {