[#42] log (production) access

This commit is contained in:
B. Endres 2022-05-11 21:45:55 +02:00
parent fd47b91b65
commit bf2a73f519
2 changed files with 2 additions and 0 deletions

View file

@ -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()) {

View file

@ -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);