From 5bcbde4f88dc656d71a50c184dc9170d13d7301d Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 29 Dec 2020 19:36:58 +0200 Subject: [PATCH] * LDAP/Addressbook: use accounts filter from setup for accounts addressbook too --- api/src/Contacts/Ldap.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/api/src/Contacts/Ldap.php b/api/src/Contacts/Ldap.php index a1c93e955d..67d35e9ba4 100644 --- a/api/src/Contacts/Ldap.php +++ b/api/src/Contacts/Ldap.php @@ -353,6 +353,11 @@ class Ldap $this->all_attributes = array_values(array_unique($this->all_attributes)); $this->charset = Api\Translation::charset(); + + // add ldap_search_filter from admin + $accounts_filter = str_replace(['%user','%domain'], ['*', $GLOBALS['egw_info']['user']['domain']], + $this->ldap_config['ldap_search_filter'] ?: '(uid=%u)'); + $this->accountsFilter = "(&$this->accountsFilter$accounts_filter)"; } /**