Don't default membership type create to inactive
authorEileen McNaughton <emcnaughton@wikimedia.org>
Thu, 13 Jan 2022 01:55:38 +0000 (14:55 +1300)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Thu, 13 Jan 2022 01:55:38 +0000 (14:55 +1300)
We don't do this for any other entity...

CRM/Member/BAO/MembershipType.php

index 1ed58d28da9af705e227bec19244e79009201ee5..3b77fa2875eeeeeb9fbff35a69f36148a7185af2 100644 (file)
@@ -84,14 +84,8 @@ class CRM_Member_BAO_MembershipType extends CRM_Member_DAO_MembershipType implem
 
     $membershipTypeId = $params['id'] ?? NULL;
 
-    if (!$membershipTypeId) {
-      if (!isset($params['is_active'])) {
-        // do we need this?
-        $params['is_active'] = FALSE;
-      }
-      if (!isset($params['domain_id'])) {
-        $params['domain_id'] = CRM_Core_Config::domainID();
-      }
+    if (!$membershipTypeId && !isset($params['domain_id'])) {
+      $params['domain_id'] = CRM_Core_Config::domainID();
     }
 
     // $previousID is the old organization id for membership type i.e 'member_of_contact_id'. This is used when an organization is changed.