From 8b6029b1c20c9af9dafcac1e44024c7eeacf8d72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Hojtsy?= <gabor@hojtsy.hu> Date: Fri, 28 May 2010 13:39:07 +0000 Subject: [PATCH] #712598 by joachim, add1sun, jhodgdon: documentation for user_pass_reset_url() --- modules/user/user.module | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/modules/user/user.module b/modules/user/user.module index 3b572a3af902..ecc72747da6f 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -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)); -- GitLab