diff --git a/api/src/Contacts/Ads.php b/api/src/Contacts/Ads.php index 69d402e67f..4bb2202c8f 100644 --- a/api/src/Contacts/Ads.php +++ b/api/src/Contacts/Ads.php @@ -104,6 +104,7 @@ class Ads extends Ldap // get filter for accounts (incl. additional filter from setup) $this->accountsFilter = $this->accounts_ads->type_filter('u', true); + $this->contactsFilter = "(|(objectclass=contact)$this->accountsFilter)"; if ($ds) { diff --git a/api/src/Contacts/Ldap.php b/api/src/Contacts/Ldap.php index f475de51ba..a1c93e955d 100644 --- a/api/src/Contacts/Ldap.php +++ b/api/src/Contacts/Ldap.php @@ -77,6 +77,12 @@ class Ldap */ var $accountsFilter = '(objectclass=posixaccount)'; + /** + * Filter used for all addressbooks + * @var string + */ + var $contactsFilter = '(objectclass=inetorgperson)'; + /** * @var string $allContactsDN holds the base DN of all addressbook */ @@ -832,7 +838,7 @@ class Ldap $objectFilter = $this->accountsFilter; break; default: - $objectFilter = '(objectclass=inetorgperson)'; + $objectFilter = $this->contactsFilter; break; } // exclude expired accounts