From: Eileen McNaughton Date: Thu, 13 Jan 2022 01:55:38 +0000 (+1300) Subject: Don't default membership type create to inactive X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=0c3819e1af57a7abd42fe9431567c59148dcbcc9;p=civicrm-core.git Don't default membership type create to inactive We don't do this for any other entity... --- diff --git a/CRM/Member/BAO/MembershipType.php b/CRM/Member/BAO/MembershipType.php index 1ed58d28da..3b77fa2875 100644 --- a/CRM/Member/BAO/MembershipType.php +++ b/CRM/Member/BAO/MembershipType.php @@ -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.