Skip to content
Snippets Groups Projects
Unverified Commit 74af2168 authored by totten's avatar totten Committed by GitHub
Browse files

Merge pull request #21053 from eileenmcnaughton/group_odd

#2742 fix group type on group create from form
parents 4d1fe7f7 688c9746
Branches
Tags
No related merge requests found
......@@ -181,14 +181,7 @@ class CRM_Contact_Form_Task_AddToGroup extends CRM_Contact_Form_Task {
$groupParams['title'] = $params['title'];
$groupParams['description'] = $params['description'];
$groupParams['visibility'] = "User and User Admin Only";
if (array_key_exists('group_type', $params) && is_array($params['group_type'])) {
$groupParams['group_type'] = CRM_Core_DAO::VALUE_SEPARATOR . implode(CRM_Core_DAO::VALUE_SEPARATOR,
array_keys($params['group_type'])
) . CRM_Core_DAO::VALUE_SEPARATOR;
}
else {
$groupParams['group_type'] = '';
}
$groupParams['group_type'] = array_keys($params['group_type'] ?? []);
$groupParams['is_active'] = 1;
$createdGroup = CRM_Contact_BAO_Group::create($groupParams);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment