Apply firewall security on BaseForm::validateForm
modified: core/lib/Thelia/Controller/BaseController.php modified: core/lib/Thelia/Form/AddressCreateForm.php new file: core/lib/Thelia/Form/FirewallForm.php modified: core/lib/Thelia/Model/FormFirewall.php modified: setup/insert.sql
This commit is contained in:
committed by
Benjamin Perche
parent
b42ff568e0
commit
978f15357c
@@ -6,5 +6,21 @@ use Thelia\Model\Base\FormFirewall as BaseFormFirewall;
|
||||
|
||||
class FormFirewall extends BaseFormFirewall
|
||||
{
|
||||
public function resetAttempts()
|
||||
{
|
||||
$this->setAttempts(1)->save();
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function incrementAttempts()
|
||||
{
|
||||
$this->setAttempts(
|
||||
$this->getAttempts() + 1
|
||||
);
|
||||
|
||||
$this->save();
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user