Skip to content
Snippets Groups Projects
Verified Commit 2a1fd752 authored by Damien's avatar Damien
Browse files

FEAT #12072 TIME 0:25 Get emails for group contacts

parent b294f511
No related branches found
No related tags found
No related merge requests found
...@@ -259,13 +259,15 @@ class ContactGroupController ...@@ -259,13 +259,15 @@ class ContactGroupController
foreach ($list as $listItem) { foreach ($list as $listItem) {
$contact = ContactModel::getById([ $contact = ContactModel::getById([
'select' => [ 'select' => [
'id', 'firstname', 'lastname', 'company', 'address_number', 'address_street', 'address_town', 'address_postcode' 'id', 'firstname', 'lastname', 'email', 'company', 'address_number', 'address_street', 'address_town', 'address_postcode'
], ],
'id' => $listItem['contact_id'] 'id' => $listItem['contact_id']
]); ]);
if (!empty($contact)) { if (!empty($contact)) {
$email = $contact['email'];
$contact = ContactController::getFormattedContactWithAddress(['contact' => $contact, 'position' => $position])['contact']; $contact = ContactController::getFormattedContactWithAddress(['contact' => $contact, 'position' => $position])['contact'];
$contact['email'] = $email;
$contact['position'] = !empty($position) ? $position : 0; $contact['position'] = !empty($position) ? $position : 0;
$contacts[] = $contact; $contacts[] = $contact;
++$position; ++$position;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment