You are here

function _password_policy_get_preferred_password_edit_url_for_user in Password Policy 7

Gets preferred password edit URL for user.

The password edit page URL depends on whether Password Policy Password Tab is enabled. There can be multiple equivalent password edit URLs, and we have to choose one. The one we choose is the "preferred" edit URL.

Builds URL in the same way as the URL for [user:edit-url] in user.tokens.inc.

Parameters

object $account: User object.

Return value

string Absolute URL for preferred password edit page.

2 calls to _password_policy_get_preferred_password_edit_url_for_user()
PasswordPolicyExpirationTestCase::testWarningEmailsTokens in tests/password_policy_expiration.test
Tests tokens replacement in warning e-mails.
password_policy_mail_tokens in ./password_policy.module
Token callback to add Password Policy tokens for user e-mails.

File

./password_policy.module, line 1252
Allows enforcing restrictions on user passwords by defining policies.

Code

function _password_policy_get_preferred_password_edit_url_for_user($account) {
  global $language;
  $edit_path = _password_policy_get_preferred_password_edit_path_for_user($account);
  $url_options = array(
    'absolute' => TRUE,
    'language' => $language,
  );
  return url($edit_path, $url_options);
}