You are here

function advban_cron in Advanced ban 8

Implements hook_cron().

File

./advban.module, line 37
Allows to ban individual or range IP addresses.

Code

function advban_cron() {
  $unbannedIp = \Drupal::service('advban.ip_manager')
    ->unblockExpiredIp();
  if ($unbannedIp > 0) {
    \Drupal::logger('advanced ban')
      ->notice('Unbanned expired IP count: %count', [
      '%count' => $unbannedIp,
    ]);
  }
}