You are here

function user_pass_reset_url in Drupal 6

Same name and namespace in other branches
  1. 8 core/modules/user/user.module \user_pass_reset_url()
  2. 4 modules/user.module \user_pass_reset_url()
  3. 5 modules/user/user.module \user_pass_reset_url()
  4. 7 modules/user/user.module \user_pass_reset_url()
  5. 9 core/modules/user/user.module \user_pass_reset_url()

Generates a unique URL for a user to login and reset their password.

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_pass_reset_url()
user_mail_tokens in modules/user/user.module
Return an array of token to value mappings for user e-mail messages.

File

modules/user/user.module, line 1492
Enables the user registration and login system.

Code

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