diff options
author | Dries Buytaert <dries@buytaert.net> | 2001-08-16 07:20:22 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2001-08-16 07:20:22 +0000 |
commit | a7fc73ee3cff408d4164ff715f054dc6afca44da (patch) | |
tree | 68a1638febfc49c65811435cf923c535c0ad398d | |
parent | ae9233272a532393012a19446bf3b2f1822de2a0 (diff) | |
download | brdo-a7fc73ee3cff408d4164ff715f054dc6afca44da.tar.gz brdo-a7fc73ee3cff408d4164ff715f054dc6afca44da.tar.bz2 |
- account.php:
+ fixed bug with new password not being e-mailed (thanks Mike).
+ fixed bug with generating a 'not-so-rock-solid' hash upon
account registration.
-rw-r--r-- | account.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/account.php b/account.php index 7e937c576..316bd1f83 100644 --- a/account.php +++ b/account.php @@ -285,7 +285,7 @@ function account_email_submit($edit) { */ $passwd = user_password(); - $hash = substr(md5("$userid. ". time() .""), 0, 12); + $hash = substr(md5("$edit[login]. ". time() .""), 0, 12); $status = 1; /* @@ -302,7 +302,7 @@ function account_email_submit($edit) { $subject = strtr(t("Account details for %a"), array("%a" => variable_get(site_name, "drupal"))); $message = strtr(t("%a,\n\n\nyou requested us to e-mail you a new password for your account at %b. You will need to re-confirm your account or you will not be able to login. To confirm your account updates visit the URL below:\n\n %c\n\nOnce confirmed you can login using the following username and password:\n\n username: %a\n password: %d\n\n\n-- %b team"), array("%a" => $edit[login], "%b" => variable_get(site_name, "drupal"), "%c" => $link, "%d" => $passwd)); - mail($email, $subject, $message, "From: noreply"); + mail($edit[email], $subject, $message, "From: noreply"); watchdog("account", "new password: `$edit[login]' <$edit[email]>"); @@ -351,7 +351,7 @@ function account_create_submit($edit) { */ $edit[passwd] = user_password(); - $edit[hash] = substr(md5("$new[userid]. ". time()), 0, 12); + $edit[hash] = substr(md5("$edit[login]. ". time()), 0, 12); /* ** Create the new user account in the database: |