Merge pull request #55 from MarcMichalsky/issue/50
[#50] Include user_extrafield in custom_field_mapping
This commit is contained in:
commit
a326a61ade
1 changed files with 6 additions and 0 deletions
|
@ -304,6 +304,12 @@ function civicrm_api3_twingle_donation_Submit($params) {
|
||||||
if (!empty($params['custom_fields'])) {
|
if (!empty($params['custom_fields'])) {
|
||||||
$custom_field_mapping = $profile->getCustomFieldMapping();
|
$custom_field_mapping = $profile->getCustomFieldMapping();
|
||||||
|
|
||||||
|
// Include user_extrafield in custom_field_mapping if it is referenced there.
|
||||||
|
// See issue #50.
|
||||||
|
if(!empty($params['user_extrafield']) && isset($custom_field_mapping['user_extrafield'])) {
|
||||||
|
$params['custom_fields']['user_extrafield'] = $params['user_extrafield'];
|
||||||
|
}
|
||||||
|
|
||||||
foreach ($params['custom_fields'] as $twingle_field => $value) {
|
foreach ($params['custom_fields'] as $twingle_field => $value) {
|
||||||
if (isset($custom_field_mapping[$twingle_field])) {
|
if (isset($custom_field_mapping[$twingle_field])) {
|
||||||
// Get custom field definition to store values by entity the field
|
// Get custom field definition to store values by entity the field
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue