* ActiveDirectory/Mail: fix groups as distribution lists

This commit is contained in:
Ralf Becker 2020-10-22 18:06:10 +02:00
parent 978a1810bb
commit fa80d4c1f9
2 changed files with 8 additions and 1 deletions

View File

@ -104,6 +104,7 @@ class Ads extends Ldap
// get filter for accounts (incl. additional filter from setup) // get filter for accounts (incl. additional filter from setup)
$this->accountsFilter = $this->accounts_ads->type_filter('u', true); $this->accountsFilter = $this->accounts_ads->type_filter('u', true);
$this->contactsFilter = "(|(objectclass=contact)$this->accountsFilter)";
if ($ds) if ($ds)
{ {

View File

@ -77,6 +77,12 @@ class Ldap
*/ */
var $accountsFilter = '(objectclass=posixaccount)'; 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 * @var string $allContactsDN holds the base DN of all addressbook
*/ */
@ -832,7 +838,7 @@ class Ldap
$objectFilter = $this->accountsFilter; $objectFilter = $this->accountsFilter;
break; break;
default: default:
$objectFilter = '(objectclass=inetorgperson)'; $objectFilter = $this->contactsFilter;
break; break;
} }
// exclude expired accounts // exclude expired accounts