Bruteforce protection

This commit is contained in:
dignajar 2015-08-17 23:18:57 -03:00
parent 9280cf3dfe
commit 9d3de43d9e

View File

@ -73,6 +73,18 @@ class Security extends dbJSON
return true;
}
public function getNumberFailures($ip=null)
{
if(empty($ip)) {
$ip = $this->getUserIp();
}
if(isset($this->db['blackList'][$ip])) {
$userBlack = $this->db['blackList'][$ip];
return $userBlack['numberFailures'];
}
}
public function getUserIp()
{
// User IP