mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-25 01:13:25 +01:00
Calendar: Fix user listed in participants twice when creating an event from an email
This commit is contained in:
parent
7c8e0b12b2
commit
a1da1a6fa6
@ -573,7 +573,7 @@ class calendar_uiforms extends calendar_ui
|
|||||||
if (is_numeric($uid))
|
if (is_numeric($uid))
|
||||||
{
|
{
|
||||||
$id = $uid;
|
$id = $uid;
|
||||||
$type = 'u';
|
$type = '';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -3500,21 +3500,21 @@ class calendar_uiforms extends calendar_ui
|
|||||||
$AB = new Api\Contacts();
|
$AB = new Api\Contacts();
|
||||||
$accounts = array(0 => $GLOBALS['egw_info']['user']['account_id']);
|
$accounts = array(0 => $GLOBALS['egw_info']['user']['account_id']);
|
||||||
|
|
||||||
$participants[0] = array (
|
$participants[0] = array(
|
||||||
'uid' => $GLOBALS['egw_info']['user']['account_id'],
|
'uid' => $GLOBALS['egw_info']['user']['account_id'],
|
||||||
'delete_id' => $GLOBALS['egw_info']['user']['account_id'],
|
'delete_id' => $GLOBALS['egw_info']['user']['account_id'],
|
||||||
'status' => 'A',
|
'status' => 'A',
|
||||||
'old_status' => 'A',
|
'old_status' => 'A',
|
||||||
'app' => 'User',
|
'app' => 'api-accounts',
|
||||||
'role' => 'REQ-PARTICIPANT'
|
'role' => 'REQ-PARTICIPANT'
|
||||||
);
|
);
|
||||||
foreach($mailContent['addresses'] as $address)
|
foreach($mailContent['addresses'] as $address)
|
||||||
{
|
{
|
||||||
// Get available contacts from the email
|
// Get available contacts from the email
|
||||||
$contacts = $AB->search(array(
|
$contacts = $AB->search(array(
|
||||||
'email' => $address['email'],
|
'email' => $address['email'],
|
||||||
'email_home' => $address['email']
|
'email_home' => $address['email']
|
||||||
),'contact_id,contact_email,contact_email_home,egw_addressbook.account_id as account_id','','','',false,'OR',false,array('owner' => 0),'',false);
|
), 'contact_id,contact_email,contact_email_home,egw_addressbook.account_id as account_id', '', '', '', false, 'OR', false, array('owner' => 0), '', false);
|
||||||
if (is_array($contacts))
|
if (is_array($contacts))
|
||||||
{
|
{
|
||||||
foreach($contacts as $account)
|
foreach($contacts as $account)
|
||||||
|
Loading…
Reference in New Issue
Block a user