You are here

function user_expire_cron in User Expire 8

Same name and namespace in other branches
  1. 7 user_expire.module \user_expire_cron()

Implements hook_cron().

1 call to user_expire_cron()
UserExpireTest::testUserExpire in tests/src/Functional/UserExpireTest.php
Tests user expiration functionality.

File

./user_expire.module, line 171
Main module file for User expire module.

Code

function user_expire_cron() {
  $logger = \Drupal::logger('user_expire');

  // Warn the per-role inactivity blocking first, in cases where they get
  // blocked right after at least they will know why.
  $logger
    ->warning('Processing per role expiration warning.');
  user_expire_expire_by_role_warning();

  // Then do per-user blocking.
  $logger
    ->info('Processing per user expiration.');
  user_expire_process_per_user_expiration();

  // Then per-role inactivity blocking.
  $logger
    ->info('Processing per role expiration.');
  user_expire_expire_by_role();
  $logger
    ->info('Cron processing finished.');
}