function user_registrationpassword_confirmation_url in User registration password 7
Same name and namespace in other branches
- 8 user_registrationpassword.module \user_registrationpassword_confirmation_url()
- 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()
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,
));
}