You are here

function user_registrationpassword_confirmation_url in User registration password 7

Same name and namespace in other branches
  1. 8 user_registrationpassword.module \user_registrationpassword_confirmation_url()
  2. 6 user_registrationpassword.module \user_registrationpassword_confirmation_url()

Generates a unique URL for a user to login with their password already set.

Parameters

object $account: An object containing the user account.

Return value

string A unique URL that provides a one-time log in for the user, from which they can change their password.

See also

user_registrationpassword_mail_tokens()

user_pass_rehash()

2 calls to user_registrationpassword_confirmation_url()
user_registrationpassword_mail_tokens in ./user_registrationpassword.module
Token callback to add unsafe tokens for user mails.
user_registrationpassword_tokens in ./user_registrationpassword.tokens.inc
Implements hook_tokens().

File

./user_registrationpassword.module, line 418
Enables password creation on registration form.

Code

function user_registrationpassword_confirmation_url($account) {
  $timestamp = REQUEST_TIME;
  return url("user/registrationpassword/{$account->uid}/{$timestamp}/" . user_pass_rehash($account->pass, $timestamp, $account->login, $account->uid), array(
    'absolute' => TRUE,
  ));
}