BanIpManager::isBanned

public BanIpManager::isBanned($ip)

Returns if this IP address is banned.

Parameters

string $ip: The IP address to check.

Return value

bool TRUE if the IP address is banned, FALSE otherwise.

Overrides BanIpManagerInterface::isBanned

File

core/modules/ban/src/BanIpManager.php, line 32

Class

BanIpManager
Ban IP manager.

Namespace

Drupal\ban

Code

public function isBanned($ip) {
  return (bool) $this->connection->query("SELECT * FROM {ban_ip} WHERE ip = :ip", array(':ip' => $ip))->fetchField();
}
doc_Drupal
2016-10-29 08:45:29
Comments
Leave a Comment

Please login to continue.