git.gnu.io has moved to IP address 209.51.188.249 -- please double check where you are logging in.

Commit aa1424a3 authored by Matt Lee's avatar Matt Lee

pass the host to sendEmail()

parent b5d26fd4
...@@ -32,10 +32,9 @@ if ($registration_disabled == true) { ...@@ -32,10 +32,9 @@ if ($registration_disabled == true) {
displayError("Registration disabled", "Registration has been disabled by the site owner, sorry!"); displayError("Registration disabled", "Registration has been disabled by the site owner, sorry!");
} }
function sendEmail($to, $subject, $message) { function sendEmail($to, $subject, $message, $base_url) {
$foo = parse_url($base_url); $foo = parse_url($base_url);
$domain = $foo['host']; $domain = $foo['host'];
$headers = 'From: do-not-reply@' . $domain . "\r\n" . $headers = 'From: do-not-reply@' . $domain . "\r\n" .
...@@ -142,7 +141,7 @@ if (isset($_POST['register'])) { ...@@ -142,7 +141,7 @@ if (isset($_POST['register'])) {
. "your activation code will be permanently deleted from our database. If you do not want to activate your account, " . "your activation code will be permanently deleted from our database. If you do not want to activate your account, "
. "please disregard this email.\n\n" . $url . "\n\n- The " . $site_name . " Team"; . "please disregard this email.\n\n" . $url . "\n\n- The " . $site_name . " Team";
$subject = $site_name . ' Account Activation - Action needed!'; $subject = $site_name . ' Account Activation - Action needed!';
sendEmail($email, $subject, $content); sendEmail($email, $subject, $content, $base_url);
$smarty->assign('registered', true); $smarty->assign('registered', true);
} else { } else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment