From 80eb95342b719d77b4a1013333879e282c972f90 Mon Sep 17 00:00:00 2001 From: Herb Date: Thu, 23 Mar 2023 15:41:59 -0400 Subject: [PATCH] dev/core#4200 use org ID rather than assume it --- CRM/Core/BAO/UFGroup.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CRM/Core/BAO/UFGroup.php b/CRM/Core/BAO/UFGroup.php index f41e9bfeb0..0d121267dc 100644 --- a/CRM/Core/BAO/UFGroup.php +++ b/CRM/Core/BAO/UFGroup.php @@ -1932,8 +1932,9 @@ AND ( entity_id IS NULL OR entity_id <= 0 ) // we only have one org - so we should default to it. Not sure about defaulting to first type // as it could be missed - so adding a select // however, possibly that is more similar to the membership form - if (count($types[1]) > 1) { - $types[1] = $select + $types[1]; + $orgId = array_key_first($orgInfo); + if (!empty($types[$orgId])) { + $types[$orgId] = $select + $types[$orgId]; } } else { -- 2.25.1