Returns if this IP address is banned.
string $ip: The IP address to check.
bool TRUE if the IP address is banned, FALSE otherwise.
public function isBanned($ip) {
return (bool) $this->connection
->query("SELECT * FROM {ban_ip} WHERE ip = :ip", array(
':ip' => $ip,
))
->fetchField();
}