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']; } $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 .= "

Your username is: $user[name]
"; $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.

"; $mailer->sendMail($email, $title, $body, $user['name']); ?>

Account Found!

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.

Account recovery failed!

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 .= "


I am an automatic no-reply e-mail. Any emails sent back to me will be ignored.

"; $mailer->sendMail($email, $title, $body, $user['name']); ?>

Account Found!

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.

Account recovery failed!

Submitted data is wrong.

Account Recovery



Username:
'; else echo '
'; if ($config['use_captcha']) { ?> Write the image symbols in the text field to verify that you are a human: CAPTCHA Image
[ Different Image ]

Do you wish to recover your username or password?

System Disabled

The admin have disabled automatic account recovery.