Phpauth\Auth::isBlocked PHP Method

isBlocked() public method

Informs if a user is locked out
public isBlocked ( ) : string
return string
    public function isBlocked()
    {
        $ip = $this->getIp();
        $this->deleteAttempts($ip, false);
        $query = $this->dbh->prepare("SELECT count(*) FROM {$this->config->table_attempts} WHERE ip = ?");
        $query->execute(array($ip));
        $attempts = $query->fetchColumn();
        if ($attempts < intval($this->config->attempts_before_verify)) {
            return "allow";
        }
        if ($attempts < intval($this->config->attempts_before_ban)) {
            return "verify";
        }
        return "block";
    }