You are here

function role_watchdog_user_block in Role Watchdog 7

Same name and namespace in other branches
  1. 6.2 role_watchdog.module \role_watchdog_user_block()
  2. 6 role_watchdog.module \role_watchdog_user_block()
  3. 7.2 role_watchdog.module \role_watchdog_user_block()

Process user block / unblock

1 call to role_watchdog_user_block()
role_watchdog_user_presave in ./role_watchdog.module
Implements hook_user_presave().

File

./role_watchdog.module, line 146
Logs changes to user roles.

Code

function role_watchdog_user_block($account, $status) {
  if ($account->status != $status) {
    if ($status) {
      return _role_watchdog_process_role_changes($account, array(
        DRUPAL_AUTHENTICATED_RID,
      ), array());
    }
    else {
      return _role_watchdog_process_role_changes($account, array(), array(
        DRUPAL_AUTHENTICATED_RID,
      ));
    }
  }
}