diff --git a/kernel/security.class.php b/kernel/security.class.php index 7fe3be21..3761a1e4 100644 --- a/kernel/security.class.php +++ b/kernel/security.class.php @@ -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