CRM-16882 renew my membership automatically should not show for non-auto-renew member...
authorEileen McNaughton <eileen@fuzion.co.nz>
Wed, 22 Jul 2015 02:38:03 +0000 (14:38 +1200)
committerEileen McNaughton <eileen@fuzion.co.nz>
Wed, 22 Jul 2015 02:54:34 +0000 (14:54 +1200)
I am not convinced this is the full story on CRM-16882 - however, it makes
the symptom disappear, at least in one instance & the logic of the change
is strong - ie. when iterating through the memberships to determine
auto-renewability we should
check whether they are auto-renew

CRM/Member/BAO/Membership.php

index 31e293d5e5c2f5cb42a11e82d83c82a1107ba330..05045c925a1a566f1745128f05f4ada60f73100d 100644 (file)
@@ -838,7 +838,7 @@ INNER JOIN  civicrm_membership_type type ON ( type.id = membership.membership_ty
           }
           elseif ($memType['is_active']) {
             $javascriptMethod = NULL;
-            $allowAutoRenewOpt = 1;
+            $allowAutoRenewOpt = (int) $memType['auto_renew'];
             if (is_array($form->_paymentProcessors)) {
               foreach ($form->_paymentProcessors as $id => $val) {
                 if (!$val['is_recur']) {