* Addressbook: only add groups as distribution lists, if accounts addressbook is not hidden

This commit is contained in:
Ralf Becker 2017-02-06 09:21:50 +01:00
parent e8b08eedbe
commit 250cbb5704

View File

@ -1038,12 +1038,15 @@ class Storage
}
}
// add groups for all backends
foreach($GLOBALS['egw']->accounts->search(array(
'type' => 'groups'
)) as $account_id => $group)
// add groups for all backends, if accounts addressbook is not hidden
if (empty($GLOBALS['egw_info']['user']['preferences']['addressbook']['hide_accounts']))
{
$lists[(string)$account_id] = Api\Accounts::format_username($group['account_lid'], '', '', $account_id);
foreach($GLOBALS['egw']->accounts->search(array(
'type' => 'groups'
)) as $account_id => $group)
{
$lists[(string)$account_id] = Api\Accounts::format_username($group['account_lid'], '', '', $account_id);
}
}
return $lists;