You are here

function user_registrationpassword_confirmation_url in User registration password 6

Same name and namespace in other branches
  1. 8 user_registrationpassword.module \user_registrationpassword_confirmation_url()
  2. 7 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

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

1 call to user_registrationpassword_confirmation_url()
user_registrationpassword_mail_tokens in ./user_registrationpassword.module
Token callback to add unsafe tokens for user mails.

File

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

Code

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