You are here

function _password_policy_is_path_allowed_when_password_change_forced in Password Policy 6

Same name and namespace in other branches
  1. 7 password_policy.module \_password_policy_is_path_allowed_when_password_change_forced()

Determines whether access to path allowed when user password change forced.

Return value

TRUE if the path is allowed, FALSE otherwise.

1 call to _password_policy_is_path_allowed_when_password_change_forced()
password_policy_init in ./password_policy.module
Implements hook_init().

File

./password_policy.module, line 70
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_is_path_allowed_when_password_change_forced() {
  $current_path = $_GET['q'];
  $excluded_paths = _password_policy_get_excluded_page_paths();
  $password_change_paths = _password_policy_get_password_change_paths();
  $allowed_paths = array_merge($excluded_paths, $password_change_paths);
  return in_array($current_path, $allowed_paths);
}