From c3ef1ab6b7d83732c00a321b8241a16fcea752d8 Mon Sep 17 00:00:00 2001 From: lovenunu Date: Mon, 14 Jul 2014 21:51:39 +0200 Subject: [PATCH] Fix logicial error on counting attempts modified: core/lib/Thelia/Form/FirewallForm.php modified: core/lib/Thelia/Model/FormFirewall.php --- core/lib/Thelia/Form/FirewallForm.php | 2 +- core/lib/Thelia/Model/FormFirewall.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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; }