| Versionen | |
|---|---|
| drupal6 – drupal7 | user_pass_reset_url($account) |
Generates a unique URL for a user to login and reset their password.
object $account An object containing the user account.
A unique URL that provides a one-time log in for the user, from which they can change their password.
modules/
<?php
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));
}
?>
Kommentare
Kommentar hinzufügen