You are here

function password_policy_init in Password Policy 6

Same name and namespace in other branches
  1. 7.2 password_policy.module \password_policy_init()
  2. 7 password_policy.module \password_policy_init()

Implements hook_init().

File

./password_policy.module, line 29
The password policy module allows you to enforce a specific level of password complexity for the user passwords on the system.

Code

function password_policy_init() {
  global $user;

  // Check password reset status and force a reset if needed.
  if (_password_policy_is_password_change_forced($user->uid) && !_password_policy_is_path_allowed_when_password_change_forced()) {
    _password_policy_set_password_change_forced_message();
    _password_policy_go_to_password_change_page();
  }
}