From a880e38e128700e750beafb700c93b3b477b37cf Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Wed, 25 Feb 2015 14:20:29 -0500 Subject: [PATCH] Profile api - remove unused code --- api/v3/Profile.php | 40 ---------------------------------------- 1 file changed, 40 deletions(-) diff --git a/api/v3/Profile.php b/api/v3/Profile.php index adc6a64f7e..25ebe8ed19 100644 --- a/api/v3/Profile.php +++ b/api/v3/Profile.php @@ -245,47 +245,7 @@ function civicrm_api3_profile_submit($params) { $profileParams['api.activity.create'] = $activityParams; } - $groups = $tags = array(); - if (isset($profileParams['group'])) { - $groups = $profileParams['group']; - unset($profileParams['group']); - } - - if (isset($profileParams['tag'])) { - $tags = $profileParams['tag']; - unset($profileParams['tag']); - } - return civicrm_api3('contact', 'create', $profileParams); - - $ufGroupDetails = array(); - $ufGroupParams = array('id' => $profileID); - CRM_Core_BAO_UFGroup::retrieve($ufGroupParams, $ufGroupDetails); - - if (isset($profileFields['group'])) { - CRM_Contact_BAO_GroupContact::create($groups, - $params['contact_id'], - FALSE, - 'Admin' - ); - } - - if (isset($profileFields['tag'])) { - CRM_Core_BAO_EntityTag::create($tags, - 'civicrm_contact', - $params['contact_id'] - ); - } - - if (!empty($ufGroupDetails['add_to_group_id'])) { - $contactIds = array($params['contact_id']); - CRM_Contact_BAO_GroupContact::addContactsToGroup($contactIds, - $ufGroupDetails['add_to_group_id'] - ); - } - - return $result; - } /** -- 2.25.1