From 0179b2c97ec68bc7a560e7e693122f7d8fde1c63 Mon Sep 17 00:00:00 2001
From: Stefan Brannfjell Your username is: $user[name]Account Recovery
-
-check($_POST['captcha_code']) == false) {
+ $status = false;
+ }
+ }
+ if ($status) {
+ if (!$username) {
+ // Recover username
+ $salt = '';
+ if ($config['TFSVersion'] != 'TFS_03') {
+ // TFS 0.2 and 1.0
+ $password = sha1($password);
+ } else {
+ // TFS 0.3/4
+ if (config('salt') === true) {
+ $saltdata = mysql_select_single("SELECT `salt` FROM `accounts` WHERE `email`='$email' LIMIT 1;");
+ if ($saltdata !== false) $salt .= $saltdata['salt'];
}
- // end EDOM
- } else { echo 'That character name does not exist.'; }
- } else { echo 'You need to type in a character name from your account.'; }
-
+ $password = sha1($salt.$password);
+ }
+ $user = mysql_select_single("SELECT `p`.`id` AS `player_id`, `a`.`name` FROM `players` `p` INNER JOIN `accounts` `a` ON `p`.`account_id` = `a`.`id` WHERE `p`.`name` = '$character' AND `a`.`email` = '$email' AND `a`.`password` = '$password' LIMIT 1;");
+ if ($user !== false) {
+ // Found user
+
+ $mailer = new Mail($config['mailserver']);
+ $title = "$_SERVER[HTTP_HOST]: Your username";
+ $body = "Account Recovery
";
+ $body .= "
";
+ $body .= "Enjoy your stay at ".$config['mailserver']['fromName'].".
";
+ $body .= "
I am an automatic no-reply e-mail. Any emails sent back to me will be ignored.
We have sent your username to .
+If you can't find the email within 5 minutes, check your junk/trash inbox as it may be mislocated there.
+ +Submitted data is wrong.
+ Account Recovery"; + $body .= "Your new password is: $newpass
";
+ $body .= "We recommend you to login and change it before you continue playing.
";
+ $body .= "Enjoy your stay at ".$config['mailserver']['fromName'].".
";
+ $body .= "
We have sent your new password to .
+If you can't find the email within 5 minutes, check your junk/trash inbox as it may be mislocated there.
+ +Submitted data is wrong.
+ +Do you wish to recover your username or password?
+ - - - - +The admin have disabled automatic account recovery.
+ - - \ No newline at end of file +include 'layout/overall/footer.php'; ?> \ No newline at end of file