diff --git a/public/takeinvite.php b/public/takeinvite.php index 64b03921..68f1eb8c 100644 --- a/public/takeinvite.php +++ b/public/takeinvite.php @@ -49,7 +49,7 @@ $title = $SITENAME.$lang_takeinvite['mail_tilte']; sql_query("INSERT INTO invites (inviter, invitee, hash, time_invited) VALUES ('".mysql_real_escape_string($id)."', '".mysql_real_escape_string($email)."', '".mysql_real_escape_string($hash)."', " . sqlesc(date("Y-m-d H:i:s")) . ")"); sql_query("UPDATE users SET invites = invites - 1 WHERE id = ".mysql_real_escape_string($id)) or sqlerr(__FILE__, __LINE__); -$signupUrl = getBaseUrl() . "/signup.php?type=invite&invitenumber=$hash"; +$signupUrl = getSchemeAndHttpHost() . "/signup.php?type=invite&invitenumber=$hash"; $message = <<{$lang_takeinvite['mail_here']}
diff --git a/public/takesignup.php b/public/takesignup.php index 6be5b945..7b6b917d 100644 --- a/public/takesignup.php +++ b/public/takesignup.php @@ -64,7 +64,7 @@ $ip = getip(); $res = sql_query("SELECT username FROM users WHERE id = $inviter") or sqlerr(__FILE__, __LINE__); $arr = mysql_fetch_assoc($res); -$invusername = $arr[username]; +$invusername = $arr['username']; } if (!mkglobal("wantusername:wantpassword:passagain:email")) @@ -171,14 +171,16 @@ $psecret = md5($row['secret']); $ip = getip(); $usern = htmlspecialchars($wantusername); $title = $SITENAME.$lang_takesignup['mail_title']; +$confirmUrl = getSchemeAndHttpHost() . "/confirm.php?id=$id&secret=$psecret"; +$confirmResendUrl = getSchemeAndHttpHost() . "/confirm_resend.php"; $body = << + {$lang_takesignup['mail_this_link']}
-http://$BASEURL/confirm.php?id=$id&secret=$psecret +$confirmUrl {$lang_takesignup['mail_four_1']} -{$lang_takesignup['mail_here']}
-http://$BASEURL/confirm_resend.php +{$lang_takesignup['mail_here']}
+$confirmResendUrl
{$lang_takesignup['mail_five']} EOD;