function user_pass_reset_url
user_pass_reset_url($account)
Generates a unique URL for a user to login and reset their password.
Parameters
object $account: An object containing the user account, which must contain at least the following properties:
- uid: The user ID number.
- login: The UNIX timestamp of the user's last login.
Return value
A unique URL that provides a one-time log in for the user, from which they can change their password.
File
- modules/user/user.module, line 2366
- Enables the user registration and login system.
Code
function user_pass_reset_url($account) { $timestamp = REQUEST_TIME; return url("user/reset/$account->uid/$timestamp/" . user_pass_rehash($account->pass, $timestamp, $account->login, $account->uid), array('absolute' => TRUE)); }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!user!user.module/function/user_pass_reset_url/7.x