You are here

function role_watchdog_user_block in Role Watchdog 6

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

Process user block / unblock

1 call to role_watchdog_user_block()
role_watchdog_user in ./role_watchdog.module
Implementation of hook_user().

File

./role_watchdog.module, line 133
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,
      ));
    }
  }
}