Skip to content
Snippets Groups Projects
Commit ff9fff23 authored by eileen's avatar eileen
Browse files

CRM-12759 fix inconsistency in application of multisite setting

parent 42e0f7a9
No related branches found
No related tags found
No related merge requests found
......@@ -324,16 +324,15 @@ class CRM_Contact_BAO_Contact extends CRM_Contact_DAO_Contact {
if (CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::MULTISITE_PREFERENCES_NAME,
'is_enabled'
)) {
// in order to make sure that every contact must be added to a group (CRM-4613) -
// Enabling multisite causes the contact to be added to the domain group
$domainGroupID = CRM_Core_BAO_Domain::getGroupId();
if (CRM_Utils_Array::value('group', $params) && is_array($params['group'])) {
$grpFlp = array_flip($params['group']);
if (!array_key_exists(1, $grpFlp)) {
if(!empty($domainGroupID)){
if (CRM_Utils_Array::value('group', $params) && is_array($params['group'])) {
$params['group'][$domainGroupID] = 1;
}
}
else {
$params['group'] = array($domainGroupID => 1);
else {
$params['group'] = array($domainGroupID => 1);
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment