fix bug on new contributions submitted from non-logged in user
This commit is contained in:
parent
a4ba86b09e
commit
fe8053a414
@ -286,10 +286,12 @@ function _batchexportperm_civicrm_allow_contribution_to_edit($contributionId) {
|
|||||||
'custom_group_id' => "batchexportperm_batch_details",
|
'custom_group_id' => "batchexportperm_batch_details",
|
||||||
'name' => "export_date",
|
'name' => "export_date",
|
||||||
]);
|
]);
|
||||||
$exportDate = civicrm_api3('Contribution', 'getvalue', [
|
$exportDate = civicrm_api3('Contribution', 'get', [
|
||||||
'return' => "custom_{$customFieldId}",
|
'return' => "custom_{$customFieldId}",
|
||||||
'id' => $contributionId,
|
'id' => $contributionId,
|
||||||
]);
|
'sequential' => 1,
|
||||||
|
])['values'][0]["custom_{$customFieldId}"];
|
||||||
|
CRM_Core_Error::debug('exportdate', $exportDate);
|
||||||
if (empty($exportDate) || CRM_Core_Permission::check('edit exported contributions')) {
|
if (empty($exportDate) || CRM_Core_Permission::check('edit exported contributions')) {
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user