Skip to content

Commit

Permalink
Use page size parameter from ltb-common (#165)
Browse files Browse the repository at this point in the history
  • Loading branch information
David Coutadeur committed Sep 18, 2024
1 parent 9c1274d commit 39b7c5e
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 1 deletion.
1 change: 1 addition & 0 deletions conf/config.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
10 changes: 10 additions & 0 deletions docs/ldap-parameters.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
----------

Expand Down
12 changes: 12 additions & 0 deletions docs/upgrade.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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;
3 changes: 2 additions & 1 deletion htdocs/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
);

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

0 comments on commit 39b7c5e

Please sign in to comment.