diff options
author | Steven Wittens <steven@10.no-reply.drupal.org> | 2001-05-14 21:12:41 +0000 |
---|---|---|
committer | Steven Wittens <steven@10.no-reply.drupal.org> | 2001-05-14 21:12:41 +0000 |
commit | 9790dc105c59ec3f7ccc8b7c36513b0014e9a5f4 (patch) | |
tree | 2b3163c83aab2a0187cc71f002b4afa8fd9ec093 /account.php | |
parent | bb3ccea5f7794cfb462e102eefe821cfa44a5307 (diff) | |
download | brdo-9790dc105c59ec3f7ccc8b7c36513b0014e9a5f4.tar.gz brdo-9790dc105c59ec3f7ccc8b7c36513b0014e9a5f4.tar.bz2 |
I think I've fixed the "chicken and egg"-problem when creating the first user account. I've made a snippet that deducts the host/path combo from $HTTP_HOST and $REQUEST_URI, which seems to be working OK over here. Try it out...
Diffstat (limited to 'account.php')
-rw-r--r-- | account.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/account.php b/account.php index 6490c0d18..bb50f4c36 100644 --- a/account.php +++ b/account.php @@ -272,7 +272,7 @@ function account_email_submit($userid, $email) { } function account_create_submit($userid, $email) { - global $theme; + global $theme, $HTTP_HOST, $REQUEST_URI; $new[userid] = trim($userid); $new[real_email] = trim($email); @@ -288,7 +288,7 @@ function account_create_submit($userid, $email) { $user = user_save("", array("userid" => $new[userid], "real_email" => $new[real_email], "passwd" => $new[passwd], "status" => 1, "hash" => $new[hash])); - $link = variable_get(site_url, "http://drupal/") ."account.php?op=confirm&name=$new[userid]&hash=$new[hash]"; + $link = variable_get(site_url, "http://" . $HTTP_HOST . substr($REQUEST_URI,0,strrpos($REQUEST_URI,"/")) . "/") ."account.php?op=confirm&name=$new[userid]&hash=$new[hash]"; $subject = strtr(t("Account details for %a"), array("%a" => variable_get(site_name, "drupal"))); $message = strtr(t("%a,\n\n\nsomeone signed up for a user account on %b and supplied this e-mail address as their contact. If it wasn't you, don't get your panties in a knot and simply ignore this mail. If this was you, you will have to confirm your account first or you will not be able to login. To confirm your account 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\n"), array("%a" => $new[userid], "%b" => variable_get(site_name, "drupal"), "%c" => $link, "%d" => $new[passwd])); |