dev/core/48 Fix PDF Letter only generates a single letter when multiple contact IDs...
authorMatthew Wire <devel@mrwire.co.uk>
Thu, 5 Apr 2018 10:04:08 +0000 (11:04 +0100)
committerdeb.monish <monish.deb@jmaconsulting.biz>
Tue, 17 Apr 2018 06:30:52 +0000 (12:00 +0530)
CRM/Contact/Form/Task/EmailCommon.php

index 0083bc9cf90fb054f9b706714fe17890d8009039..51e0478c478cbd5846fa5d1ec4e8ef38badcd7b8 100644 (file)
@@ -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();