Skip to content
Snippets Groups Projects
Commit 8b6029b1 authored by Gábor Hojtsy's avatar Gábor Hojtsy
Browse files

#712598 by joachim, add1sun, jhodgdon: documentation for user_pass_reset_url()

parent f3b9469d
No related branches found
No related tags found
No related merge requests found
......@@ -1452,6 +1452,16 @@ function user_external_login_register($name, $module) {
}
}
/**
* Generates a unique URL for a user to login and reset their password.
*
* @param object $account
* An object containing the user account.
*
* @return
* A unique URL that provides a one-time log in for the user, from which
* they can change their password.
*/
function user_pass_reset_url($account) {
$timestamp = time();
return url("user/reset/$account->uid/$timestamp/". user_pass_rehash($account->pass, $timestamp, $account->login), array('absolute' => TRUE));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment