$tags = $profileParams['tag'];
unset($profileParams['tag']);
}
-
+
return civicrm_api3('contact', 'create', $profileParams);
$ufGroupDetails = array();
*
* Note that that since the existing code for deriving a blank profile is not easily accessible our
* interim solution is just to return an empty array
+ *
+ * @param $params
+ *
+ * @return array
*/
function _civicrm_api3_profile_getbillingpseudoprofile(&$params) {
if(isset($profileFields[$profileID][$entityfield])) {
unset($profileFields[$profileID][$entityfield]);
}
- // we will make the mixed case version (e.g. of 'Primary') an alias
- $profileFields[$profileID][$fieldName]['api.aliases'][] = $entityfield;
+ if(!in_array($entityfield, $profileFields[$profileID][$fieldName]['api.aliases'])) {
+ // we will make the mixed case version (e.g. of 'Primary') an alias
+ $profileFields[$profileID][$fieldName]['api.aliases'][] = $entityfield;
+ }
}
/**
* putting this on hold -this would cause the api to set the default - but could have unexpected behaviour
function _civicrm_api3_order_by_weight($a, $b) {
return CRM_Utils_Array::value('weight', $b) < CRM_Utils_Array::value('weight', $a) ? TRUE : FALSE;
}
+
/**
* Here we map the profile fields as stored in the uf_field table to their 'real entity'
* we also return the profile fieldname
*
+ * @param $field
+ *
+ * @return array
*/
function _civicrm_api3_map_profile_fields_to_entity(&$field) {
$entity = $field['field_type'];