You are here

public function AdvbanIpManager::findById in Advanced ban 8

Finds a banned IP address by its ID.

Parameters

int $ban_id: The ID for a banned IP address.

Return value

string|false Either the banned IP address or FALSE if none exist with that ID.

Overrides AdvbanIpManagerInterface::findById

File

src/AdvbanIpManager.php, line 245

Class

AdvbanIpManager
Ban IP manager.

Namespace

Drupal\advban

Code

public function findById($ban_id) {
  return $this->connection
    ->query("SELECT * FROM {advban_ip} WHERE iid = :iid", [
    ':iid' => $ban_id,
  ])
    ->fetchAll();
}