diff --git a/conf/config.inc.php b/conf/config.inc.php index 29f889e..f4c20cd 100644 --- a/conf/config.inc.php +++ b/conf/config.inc.php @@ -40,6 +40,7 @@ #$ldap_default_ppolicy = "cn=default,ou=ppolicy,dc=example,dc=com"; $ldap_lastauth_attribute = "authTimestamp"; #$ldap_network_timeout = 10; +$ldap_page_size = 0; # Override LDAP password policy configuration #$ldap_lockout_duration = 3600; # 1 hour diff --git a/docs/ldap-parameters.rst b/docs/ldap-parameters.rst index 0ca7620..2a78e94 100644 --- a/docs/ldap-parameters.rst +++ b/docs/ldap-parameters.rst @@ -85,6 +85,16 @@ You can set the scope for each search in ``$ldap_scope``: .. tip:: sub is the default value. Possible values are sub, one, or base +You can retrieve users with a paged search, for example if your directory does not allow you to get all entries at once. +You can enable this feature by setting a non-zero value to the page size parameter: + +.. code-block:: php + + $ldap_page_size = 100; + +.. tip:: when setting a ``$ldap_page_size`` value > 0, service-desk sends a ``LDAP_CONTROL_PAGEDRESULTS`` control along with the search, and loop for each page + + Size limit ---------- diff --git a/docs/upgrade.rst b/docs/upgrade.rst index 04d3d59..e1f84c9 100644 --- a/docs/upgrade.rst +++ b/docs/upgrade.rst @@ -130,3 +130,15 @@ If you are using the new lastbind feature from OpenLDAP 2.5, then you must updat .. code-block:: php $ldap_lastauth_attribute = "pwdLastSuccess"; + + +New ldap parameter +~~~~~~~~~~~~~~~~~~ + +You can now retrieve users with a paged search, for example if your directory does not allow you to get all entries at once. + +You can enable this feature by setting a non-zero value to the page size parameter: + +.. code-block:: php + + $ldap_page_size = 100; diff --git a/htdocs/index.php b/htdocs/index.php index d557301..b621598 100644 --- a/htdocs/index.php +++ b/htdocs/index.php @@ -64,7 +64,8 @@ isset($ldap_network_timeout) ? $ldap_network_timeout : null, $ldap_user_base, isset($ldap_size_limit) ? $ldap_size_limit : 0, - isset($ldap_krb5ccname) ? $ldap_krb5ccname : null + isset($ldap_krb5ccname) ? $ldap_krb5ccname : null, + isset($ldap_page_size) ? $ldap_page_size : 0 ); #==============================================================================