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:
committed by
Benjamin Perche
parent
b926f27711
commit
c3ef1ab6b7
@@ -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() */
|
||||
|
||||
@@ -8,7 +8,7 @@ class FormFirewall extends BaseFormFirewall
|
||||
{
|
||||
public function resetAttempts()
|
||||
{
|
||||
$this->setAttempts(1)->save();
|
||||
$this->setAttempts(0)->save();
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user