From: Matthew Wire Date: Thu, 5 Apr 2018 10:04:08 +0000 (+0100) Subject: dev/core/48 Fix PDF Letter only generates a single letter when multiple contact IDs... X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=97dce831c593cbc741502bd8886c211378dadc20;p=civicrm-core.git dev/core/48 Fix PDF Letter only generates a single letter when multiple contact IDs are specified --- diff --git a/CRM/Contact/Form/Task/EmailCommon.php b/CRM/Contact/Form/Task/EmailCommon.php index 0083bc9cf9..51e0478c47 100644 --- a/CRM/Contact/Form/Task/EmailCommon.php +++ b/CRM/Contact/Form/Task/EmailCommon.php @@ -69,8 +69,11 @@ class CRM_Contact_Form_Task_EmailCommon { $form->_emails = array(); - $contactID = CRM_Core_Session::singleton()->getLoggedInContactID(); - $form->_contactIds = array($contactID); + // If we don't have any contact IDs, use the logged in contact ID + if (empty($form->_contactIds)) { + $contactID = CRM_Core_Session::singleton()->getLoggedInContactID(); + $form->_contactIds = array($contactID); + } $fromEmailValues = CRM_Core_BAO_Email::getFromEmail();