Variable getting started url

This commit is contained in:
Li 2022-06-14 22:32:07 +12:00
parent 66fade8a69
commit 0fea03836c
1 changed files with 3 additions and 3 deletions

View File

@ -97,9 +97,9 @@ function send_activation_email(string $email, string $username, string $password
include('config.php');
$hmac = GenHmacMessage($username, "UserActivation", false);
$hmacKey = base64_url_encode(hex2bin($hmac));
$activateUrl = get_protocol().get_host()."/web/newuser.php?U=".htmlspecialchars($username, ENT_QUOTES)."&AC=".htmlspecialchars($hmacKey, ENT_QUOTES);
$body = "<B>Welcome New Horse Isle Member!</B><BR><BR>\r\nTo Activate your account, Click the following link, or Copy-Paste/Type it in your browser.<BR><HR>\r\n<A HREF='".$activateUrl."'>\r\n".$activateUrl."</A><BR>\r\n or <BR>\r\n( ".$activateUrl." )\r\n<BR><HR>We hope you enjoy the game! Be sure you have written down your Username: ".htmlspecialchars($username, ENT_QUOTES)." and Password: ".htmlspecialchars($password, ENT_QUOTES)." someplace safe!<BR>\r\nNEVER give your password out to ANYONE, even someone claiming to work for Horse Isle.<BR>\r\n---------------------------------------------------------------------<BR>\r\n Quick Start Guide: <BR>\r\n #1) Log into hi1.horseisle.com with your newly activated account.<BR>\r\n #2) Join a server (Top one is recommended for new players)<BR>\r\n #3) Once on server click ENTER WORLD. This will start up the game.<BR>\r\n Enjoy!<BR>\r\n";
$hmacSignature = base64_url_encode(hex2bin($hmac));
$activateUrl = get_protocol().get_host()."/web/newuser.php?U=".htmlspecialchars($username, ENT_QUOTES)."&AC=".htmlspecialchars($hmacSignature, ENT_QUOTES);
$body = "<B>Welcome New Horse Isle Member!</B><BR><BR>\r\nTo Activate your account, Click the following link, or Copy-Paste/Type it in your browser.<BR><HR>\r\n<A HREF='".$activateUrl."'>\r\n".$activateUrl."</A><BR>\r\n or <BR>\r\n( ".$activateUrl." )\r\n<BR><HR>We hope you enjoy the game! Be sure you have written down your Username: ".htmlspecialchars($username, ENT_QUOTES)." and Password: ".htmlspecialchars($password, ENT_QUOTES)." someplace safe!<BR>\r\nNEVER give your password out to ANYONE, even someone claiming to work for Horse Isle.<BR>\r\n---------------------------------------------------------------------<BR>\r\n Quick Start Guide: <BR>\r\n #1) Log into ".get_protocol().get_host()." with your newly activated account.<BR>\r\n #2) Join a server (Top one is recommended for new players)<BR>\r\n #3) Once on server click ENTER WORLD. This will start up the game.<BR>\r\n Enjoy!<BR>\r\n";
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=utf-8' . "\r\n";