protected function deleteAttempts($ip, $all = false)
    {
        // NEXT : 'ip = INET_ATON(:ip)'
        $query = ($all)
            ? "DELETE FROM {$this->config->table_attempts} WHERE ip = :ip"
            : "DELETE FROM {$this->config->table_attempts} WHERE ip = :ip AND NOW() > expiredate ";

        $sth = $this->dbh->prepare($query);
        return $sth->execute([
            'ip' => $ip
        ]);
    }
protected function deleteAttempts($ip, $all = false)
    {
        // NEXT : 'ip = INET_ATON(:ip)'
        $query = ($all)
            ? "DELETE FROM {$this->config->table_attempts} WHERE ip = :ip"
            : "DELETE FROM {$this->config->table_attempts} WHERE ip = :ip AND NOW() > expiredate ";

        $sth = $this->dbh->prepare($query);
        return $sth->execute([
            'ip' => $ip
        ]);
    }
protected function deleteAttempts ( $ ip , $ all = false ) { // NEXT : 'ip = INET_ATON(:ip)' $ query = ( $ all ) ? "DELETE FROM {$this->config->table_attempts} WHERE ip = :ip" : "DELETE FROM {$this->config->table_attempts} WHERE ip = :ip AND NOW() > expiredate " ; $ sth = $ this -> dbh -> prepare ( $ query ) ; return $ sth -> execute ( [ 'ip' => $ ip ] ) ; }
Deletes all attempts for a given IP from database

@param string $ip
@param bool|false $all
@return bool
Deletes all attempts for a given IP from database