diff --git a/core/lib/Thelia/Form/FirewallForm.php b/core/lib/Thelia/Form/FirewallForm.php index 831f69e97..773486bff 100644 --- a/core/lib/Thelia/Form/FirewallForm.php +++ b/core/lib/Thelia/Form/FirewallForm.php @@ -59,7 +59,7 @@ abstract class FirewallForm extends BaseForm $firewallRow->resetAttempts(); } - if ($firewallRow->getAttempts() <= $this->getConfigAttempts()) { + if ($firewallRow->getAttempts() < $this->getConfigAttempts()) { $firewallRow->incrementAttempts(); } else { /** Set updated_at at NOW() */ diff --git a/core/lib/Thelia/Model/FormFirewall.php b/core/lib/Thelia/Model/FormFirewall.php index 0f50e62d1..4a859ccb1 100644 --- a/core/lib/Thelia/Model/FormFirewall.php +++ b/core/lib/Thelia/Model/FormFirewall.php @@ -8,7 +8,7 @@ class FormFirewall extends BaseFormFirewall { public function resetAttempts() { - $this->setAttempts(1)->save(); + $this->setAttempts(0)->save(); return $this; }