diff --git a/conf/config.inc.php b/conf/config.inc.php index 84cc099..82e39ae 100644 --- a/conf/config.inc.php +++ b/conf/config.inc.php @@ -38,6 +38,7 @@ #$ldap_default_ppolicy = "cn=default,ou=ppolicy,dc=example,dc=com"; $ldap_lastauth_attribute = "authTimestamp"; #$ldap_network_timeout = 10; +$ldap_page_size = 0; # How display attributes $attributes_map = array( diff --git a/docs/ldap-parameters.rst b/docs/ldap-parameters.rst index a6c126b..a2a28dc 100644 --- a/docs/ldap-parameters.rst +++ b/docs/ldap-parameters.rst @@ -74,6 +74,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 8150829..eb2761c 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 ); #==============================================================================