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