You are here

public function PasswordPolicyExpire::goToPasswordChangePath in Password Policy 7.2

Redirects user to password change path.

Parameters

object $account: User object of user to be redirected.

1 call to PasswordPolicyExpire::goToPasswordChangePath()
PasswordPolicyExpire::init in plugins/item/expire.inc
Checks on init if the user password has expired.

File

plugins/item/expire.inc, line 269

Class

PasswordPolicyExpire
Policy item that handles password expirations.

Code

public function goToPasswordChangePath($account) {
  $password_change_path = $this
    ->getPasswordChangePath($account);

  // Set query to redirect user back to their original destination after
  // leaving password change page.
  $options = array(
    'query' => drupal_get_destination(),
  );
  unset($_GET['destination']);
  drupal_goto($password_change_path, $options);
}