Infolog: Skip all user accounts for importing mail -> infolog entry, contacts only

This commit is contained in:
nathan 2024-06-25 15:50:27 -06:00
parent 02e35d609f
commit 1cdd0ac383

View File

@ -1472,18 +1472,24 @@ class infolog_bo
}
else
{
// Remove all accounts
$contacts = array_filter($contacts, function ($v)
{
return empty($v['account_id']);
});
// create the first address as info_contact
if(count($contacts) > 0)
{
$contact = array_shift($contacts);
$info['info_contact'] = 'addressbook:'.$contact['id'];
$info['info_contact'] = 'addressbook:' . $contact['id'];
}
// create the rest as "ordinary" links, skipping accounts
foreach ($contacts as $contact)
{
if(empty($contact['account_id']))
{
Link::link('infolog', $info['link_to']['to_id'], 'addressbook', $contact['id']);
}
}
}
if (is_array($_attachments))
{
foreach ($_attachments as $attachment)