CRM-21117: Enable useForMember for pending membership signup
authorJitendra Purohit <jitendra@fuzion.co.nz>
Tue, 29 Aug 2017 05:19:15 +0000 (10:49 +0530)
committerJitendra Purohit <jitendra@fuzion.co.nz>
Wed, 13 Sep 2017 10:45:43 +0000 (16:15 +0530)
CRM/Contribute/Form/Contribution/Confirm.php

index e135a2b6444c95e26ac4948ef2541a269bced563..56ce6b55688adc109aee8c8473ee67839dd12629 100644 (file)
@@ -1664,6 +1664,8 @@ class CRM_Contribute_Form_Contribution_Confirm extends CRM_Contribute_Form_Contr
 
     $emailValues = array_merge($membershipParams, $form->_values);
     $emailValues['membership_assign'] = 1;
+    $emailValues['useForMember'] = !empty($form->_useForMember);
+
     // Finally send an email receipt for pay-later scenario (although it might sometimes be caught above!)
     if ($totalAmount == 0) {
       // This feels like a bizarre hack as the variable name doesn't seem to be directly connected to it's use in the template.