mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-25 01:13:25 +01:00
if accounts backend is NOT SQL, we need to search that too
This commit is contained in:
parent
72bd27587c
commit
76b0bac25e
@ -219,7 +219,15 @@ class addressbook_bo extends Api\Contacts
|
|||||||
if (!$criteria) return 0;
|
if (!$criteria) return 0;
|
||||||
|
|
||||||
$updated = 0;
|
$updated = 0;
|
||||||
foreach((array)$this->search($criteria, false, '', '', '', false, 'OR') as $contact)
|
$filters = array(null);
|
||||||
|
// if accounts-backend is NOT SQL, we need to search the accounts separate
|
||||||
|
if ($this->so_accounts)
|
||||||
|
{
|
||||||
|
$filters[] = array('owner' => '0');
|
||||||
|
}
|
||||||
|
foreach($filters as $filter)
|
||||||
|
{
|
||||||
|
foreach((array)$this->search($criteria, false, '', '', '', false, 'OR', false, $filter) as $contact)
|
||||||
{
|
{
|
||||||
if ($contact['account_id'] && isset($keys[$contact['account_id']]))
|
if ($contact['account_id'] && isset($keys[$contact['account_id']]))
|
||||||
{
|
{
|
||||||
@ -267,6 +275,7 @@ class addressbook_bo extends Api\Contacts
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if ($criteria == array('egw.addressbook.account_id' => array((int)$GLOBALS['egw_info']['user']['account_id'])))
|
if ($criteria == array('egw.addressbook.account_id' => array((int)$GLOBALS['egw_info']['user']['account_id'])))
|
||||||
{
|
{
|
||||||
$message = !$updated ? lang('Permissiong denied! Ask your administrator to allow regular uses to update their public keys.') :
|
$message = !$updated ? lang('Permissiong denied! Ask your administrator to allow regular uses to update their public keys.') :
|
||||||
|
Loading…
Reference in New Issue
Block a user