Skip to content

Commit

Permalink
Fix check permissions in civicrm_api call
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Klausing committed Oct 29, 2024
1 parent 7979edb commit 2893505
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/Utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -632,9 +632,7 @@ function wf_civicrm_api4($entity, $operation, $params, $index = NULL) {
if (!$entity) {
return [];
}
$params += [
'checkPermissions' => FALSE,
];
$params['checkPermissions'] = FALSE;
$result = civicrm_api4($entity, $operation, $params, $index);
return $result;
}
Expand All @@ -658,9 +656,7 @@ function wf_civicrm_api($entity, $operation, $params) {
return [];
}

$params += [
'check_permissions' => FALSE,
];
$params['check_permissions'] = FALSE;
if ($operation == 'transact') {
$utils = \Drupal::service('webform_civicrm.utils');
$result = $utils->wf_civicrm_api3_contribution_transact($params);
Expand Down

0 comments on commit 2893505

Please sign in to comment.