* ActiveDirectory: primary group was not used when filtering accounts by a group, causing eg. no accounts to be found for "Domain Users" group in Admin or other apps

This commit is contained in:
Ralf Becker 2015-04-09 09:45:12 +00:00
parent 58ea1e3773
commit 264899f0db

View File

@ -892,7 +892,7 @@ class accounts_ads
}
if (is_numeric($param['type']))
{
$membership_filter = '(memberOf='.$this->id2name((int)$param['type'], 'account_dn').')';
$membership_filter = '(|(memberOf='.$this->id2name((int)$param['type'], 'account_dn').')(PrimaryGroupId='.abs($param['type']).'))';
$filter = $filter ? "(&$membership_filter$filter)" : $membership_filter;
}
foreach($this->filter($filter, 'u', self::$user_attributes) as $account_id => $data)