From bf2a73f5194a3e3c6a2b1781ad1aedac50235b13 Mon Sep 17 00:00:00 2001 From: "B. Endres" Date: Wed, 11 May 2022 21:45:55 +0200 Subject: [PATCH] [#42] log (production) access --- CRM/Twingle/Profile.php | 1 + api/v3/TwingleDonation/Submit.php | 1 + 2 files changed, 2 insertions(+) diff --git a/CRM/Twingle/Profile.php b/CRM/Twingle/Profile.php index 127622c..9ac1538 100644 --- a/CRM/Twingle/Profile.php +++ b/CRM/Twingle/Profile.php @@ -388,6 +388,7 @@ class CRM_Twingle_Profile { * @return CRM_Twingle_Profile[] */ public static function getProfiles() { + // todo: cache? $profiles = []; $profile_data = CRM_Core_DAO::executeQuery("SELECT name, config FROM civicrm_twingle_profile"); while ($profile_data->fetch()) { diff --git a/api/v3/TwingleDonation/Submit.php b/api/v3/TwingleDonation/Submit.php index abea337..22d2355 100644 --- a/api/v3/TwingleDonation/Submit.php +++ b/api/v3/TwingleDonation/Submit.php @@ -278,6 +278,7 @@ function civicrm_api3_twingle_donation_Submit($params) { // Get the profile defined for the given form ID, or the default profile // if none matches. $profile = CRM_Twingle_Profile::getProfileForProject($params['project_id']); + $profile->logAccess(); // Validate submitted parameters CRM_Twingle_Submission::validateSubmission($params, $profile);