From 0c3819e1af57a7abd42fe9431567c59148dcbcc9 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Thu, 13 Jan 2022 14:55:38 +1300 Subject: [PATCH] Don't default membership type create to inactive We don't do this for any other entity... --- CRM/Member/BAO/MembershipType.php | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) 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. -- 2.25.1