Fix logicial error on counting attempts

modified:   core/lib/Thelia/Form/FirewallForm.php
	modified:   core/lib/Thelia/Model/FormFirewall.php
This commit is contained in:
lovenunu
2014-07-14 21:51:39 +02:00
committed by Benjamin Perche
parent b926f27711
commit c3ef1ab6b7
2 changed files with 2 additions and 2 deletions

View File

@@ -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() */

View File

@@ -8,7 +8,7 @@ class FormFirewall extends BaseFormFirewall
{
public function resetAttempts()
{
$this->setAttempts(1)->save();
$this->setAttempts(0)->save();
return $this;
}