Skip to content

Commit

Permalink
Merge pull request #30 from 80Quattro/bugfix-double-opt-in-validation
Browse files Browse the repository at this point in the history
[BUGFIX] PowermailValidator double opt in
  • Loading branch information
80Quattro authored Oct 14, 2024
2 parents 2bfeeb9 + a3f3544 commit 91844f1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
5 changes: 4 additions & 1 deletion Classes/FieldValidator/PowermailV11Validator.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
5 changes: 4 additions & 1 deletion Classes/FieldValidator/PowermailValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion ext_emconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@
],
],
'state' => 'beta',
'version' => '0.1.7',
'version' => '0.1.8',
];

0 comments on commit 91844f1

Please sign in to comment.