diff --git a/composer.json b/composer.json index 4a58b82c..fb0d4efc 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "require": { - "ltb-project/ltb-common": "dev-36-add-password-policy", + "ltb-project/ltb-common": "dev-main", "bjeavons/zxcvbn-php": "^1.0", "twbs/bootstrap": "v5.3.3", "defuse/php-encryption": "2.4.0", diff --git a/conf/config.inc.php b/conf/config.inc.php index 14661631..53f4f27d 100644 --- a/conf/config.inc.php +++ b/conf/config.inc.php @@ -48,6 +48,7 @@ $ldap_use_exop_passwd = false; $ldap_use_ppolicy_control = false; $ldap_network_timeout = 10; +$ldap_page_size = 0; # Active Directory mode # true: use unicodePwd as password field diff --git a/docs/config_ldap.rst b/docs/config_ldap.rst index f5f89a62..16d3ab45 100644 --- a/docs/config_ldap.rst +++ b/docs/config_ldap.rst @@ -151,6 +151,14 @@ The scope can be set 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, self-service-password sends a ``LDAP_CONTROL_PAGEDRESULTS`` control along with the search, and loop for each page Extensions ---------- diff --git a/docs/upgrade.rst b/docs/upgrade.rst index f57d4379..ac4a5ec2 100644 --- a/docs/upgrade.rst +++ b/docs/upgrade.rst @@ -39,6 +39,16 @@ New bundled dependencies have been added: * php-symfony-cache = v5.4.42 * php-predis-predis = v2.2.2 +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; From 1.5 to 1.6 --------------- diff --git a/htdocs/index.php b/htdocs/index.php index 13e72282..25a47a6a 100644 --- a/htdocs/index.php +++ b/htdocs/index.php @@ -116,7 +116,8 @@ isset($ldap_network_timeout) ? $ldap_network_timeout : null, $ldap_base, null, - isset($ldap_krb5ccname) ? $ldap_krb5ccname : null + isset($ldap_krb5ccname) ? $ldap_krb5ccname : null, + isset($ldap_page_size) ? $ldap_page_size : 0 ); #==============================================================================