CRM-15555 QA fix - ensure email always assigned
[civicrm-core.git] / CRM / Contribute / Form / AbstractEditPayment.php
index 5e9be9e97c43fc128aa66685b074a6fc9a6c028f..3d8ea499975e9ba9e1c13be1d60cde59c5f50ce0 100644 (file)
@@ -580,12 +580,12 @@ LEFT JOIN  civicrm_contribution on (civicrm_contribution.contact_id = civicrm_co
    */
   protected function assignPaymentRelatedVariables() {
     try {
+      if ($this->_contactID) {
+        list($this->userDisplayName, $this->userEmail) = CRM_Contact_BAO_Contact_Location::getEmailDetails($this->_contactID);
+        $this->assign('displayName', $this->userDisplayName);
+      }
       if ($this->_mode) {
         $this->assignProcessors();
-        if ($this->_contactID) {
-          list($this->userDisplayName, $this->userEmail) = CRM_Contact_BAO_Contact_Location::getEmailDetails($this->_contactID);
-          $this->assign('displayName', $this->userDisplayName);
-        }
 
         $this->assignBillingType();