function _password_policy_get_password_edit_paths_for_user in Password Policy 7
Gets password edit paths for the given user.
2 calls to _password_policy_get_password_edit_paths_for_user()
- _password_policy_get_password_change_paths in ./
password_policy.module - Gets paths that allow user to change their password.
- _password_policy_get_preferred_password_edit_path_for_user in ./
password_policy.module - Gets preferred password edit path for given user.
File
- ./
password_policy.module, line 1022 - Allows enforcing restrictions on user passwords by defining policies.
Code
function _password_policy_get_password_edit_paths_for_user($account) {
$password_change_path = variable_get('password_policy_force_change_path', NULL);
if (!empty($password_change_path)) {
// Support replacement patterns for password_policy_force_change_path.
$password_change_path = str_replace('[user:uid]', $account->uid, $password_change_path);
$password_change_path = str_replace('[user:name]', $account->name, $password_change_path);
return array(
$password_change_path,
);
}
elseif (module_exists('password_policy_password_tab')) {
return array(
"user/{$account->uid}/password",
);
}
else {
return array(
"user/{$account->uid}/edit/account",
"user/{$account->uid}/edit",
);
}
}