Skip to content

Commit

Permalink
Use page size parameter from ltb-common (#895)
Browse files Browse the repository at this point in the history
  • Loading branch information
David Coutadeur committed Sep 18, 2024
1 parent fc0991f commit 612e3f7
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 2 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
1 change: 1 addition & 0 deletions conf/config.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 8 additions & 0 deletions docs/config_ldap.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
----------
Expand Down
10 changes: 10 additions & 0 deletions docs/upgrade.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
---------------
Expand Down
3 changes: 2 additions & 1 deletion htdocs/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
);

#==============================================================================
Expand Down

0 comments on commit 612e3f7

Please sign in to comment.