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

Commit bb3b94a6 authored by Jonas Haraldsson's avatar Jonas Haraldsson

Move $subject out of sendEmail()

couldnt read $site_name from inside function
parent 97d849c9
......@@ -28,9 +28,8 @@ if ($logged_in == true) {
exit();
}
function sendEmail($text, $email) {
$subject = $site_name . ' Account Activation - Action needed!';
mail($email, $subject, $text);
function sendEmail($to, $subject, $message) {
mail($to, $subject, $message);
}
if (isset($_GET['auth'])) {
......@@ -147,7 +146,8 @@ if (isset($_POST['register'])) {
. "your account within 48 hours, after which time all information provided by you and "
. "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";
sendEmail($content, $email);
$subject = $site_name . ' Account Activation - Action needed!';
sendEmail($email, $subject, $content);
$smarty->assign('registered', true);
} 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