From a3f354489d4baa1bd1031c63abb519a5e781880e Mon Sep 17 00:00:00 2001 From: Rafal Jania Date: Mon, 14 Oct 2024 11:48:39 +0200 Subject: [PATCH] [BUGFIX] PowermailValidator double opt in --- Classes/FieldValidator/PowermailV11Validator.php | 5 ++++- Classes/FieldValidator/PowermailValidator.php | 5 ++++- ext_emconf.php | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Classes/FieldValidator/PowermailV11Validator.php b/Classes/FieldValidator/PowermailV11Validator.php index fee83a8..e7f55c5 100644 --- a/Classes/FieldValidator/PowermailV11Validator.php +++ b/Classes/FieldValidator/PowermailV11Validator.php @@ -49,7 +49,10 @@ protected function isCaptchaCheckToSkip(): bool { if (property_exists($this, 'flexForm')) { $confirmationActive = $this->flexForm['settings']['flexform']['main']['confirmation'] === '1'; - return $this->getActionName() === 'create' && $confirmationActive; + $optinActive = $this->flexForm['settings']['flexform']['main']['optin'] === '1'; + + return $this->getActionName() === 'create' && $confirmationActive + || $this->getActionName() === 'optinConfirm' && $optinActive; } return false; } diff --git a/Classes/FieldValidator/PowermailValidator.php b/Classes/FieldValidator/PowermailValidator.php index 8e9e0ee..8fd52ca 100644 --- a/Classes/FieldValidator/PowermailValidator.php +++ b/Classes/FieldValidator/PowermailValidator.php @@ -62,7 +62,10 @@ protected function isCaptchaCheckToSkip(): bool { if (property_exists($this, 'flexForm')) { $confirmationActive = $this->flexForm['settings']['flexform']['main']['confirmation'] === '1'; - return $this->getActionName() === 'create' && $confirmationActive; + $optinActive = $this->flexForm['settings']['flexform']['main']['optin'] === '1'; + + return $this->getActionName() === 'create' && $confirmationActive + || $this->getActionName() === 'optinConfirm' && $optinActive; } return false; } diff --git a/ext_emconf.php b/ext_emconf.php index d87c2c5..cde67a9 100644 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -17,5 +17,5 @@ ], ], 'state' => 'beta', - 'version' => '0.1.7', + 'version' => '0.1.8', ];