bug: Improve LDAP filter in the getUserlist() function (#8253)
Improve LDAP filtering to improve the speed of some pages (Dashboard and Edit User mainly). If we don't apply this filter all the users are getted from LDAP and used in to the loop, with 2k users (for us) the page take more than 15 seconds to be loaded. I have check than people still have differante access with this fix.
This commit is contained in:
parent
72dffd8d95
commit
0e09e09f04
|
@ -136,7 +136,7 @@ class LdapAuthorizer extends AuthorizerBase
|
|||
try {
|
||||
$connection = $this->getLdapConnection();
|
||||
|
||||
$filter = '(' . Config::get('auth_ldap_prefix') . '*)';
|
||||
$filter = '(&(' . Config::get('auth_ldap_prefix') . '*)(memberOf=' . trim(Config::get('auth_ldap_group'), ',') . '))';
|
||||
$search = ldap_search($connection, trim(Config::get('auth_ldap_suffix'), ','), $filter);
|
||||
$entries = ldap_get_entries($connection, $search);
|
||||
|
||||
|
|
Loading…
Reference in New Issue