mirror of
https://github.com/Znote/ZnoteAAC.git
synced 2025-06-15 17:24:29 +02:00
Fix Recovery Page (OTHire Compatibility) (#333)
- Now you can recover your account number or password
This commit is contained in:
parent
9a9bbec068
commit
7146a77bff
16
recovery.php
16
recovery.php
@ -32,7 +32,12 @@ if ($config['mailserver']['accountRecovery']) {
|
||||
}
|
||||
$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 ($config['ServerEngine'] != 'OTHIRE')
|
||||
$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;");
|
||||
else
|
||||
$user = mysql_select_single("SELECT `p`.`id` AS `player_id`, `a`.`id` 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
|
||||
|
||||
@ -72,7 +77,12 @@ if ($config['mailserver']['accountRecovery']) {
|
||||
}
|
||||
$password = sha1($salt.$newpass);
|
||||
}
|
||||
$user = mysql_select_single("SELECT `p`.`id` AS `player_id`, `a`.`name`, `a`.`id` AS `account_id` FROM `players` `p` INNER JOIN `accounts` `a` ON `p`.`account_id` = `a`.`id` WHERE `p`.`name` = '$character' AND `a`.`email` = '$email' AND `a`.`name` = '$username' LIMIT 1;");
|
||||
|
||||
if ($config['ServerEngine'] != 'OTHIRE')
|
||||
$user = mysql_select_single("SELECT `p`.`id` AS `player_id`, `a`.`name`, `a`.`id` AS `account_id` FROM `players` `p` INNER JOIN `accounts` `a` ON `p`.`account_id` = `a`.`id` WHERE `p`.`name` = '$character' AND `a`.`email` = '$email' AND `a`.`name` = '$username' LIMIT 1;");
|
||||
else
|
||||
$user = mysql_select_single("SELECT `p`.`id` AS `player_id`, `a`.`id` AS `account_id` FROM `players` `p` INNER JOIN `accounts` `a` ON `p`.`account_id` = `a`.`id` WHERE `p`.`name` = '$character' AND `a`.`email` = '$email' AND `a`.`id` = '$username' LIMIT 1;");
|
||||
|
||||
if ($user !== false) {
|
||||
// Found user
|
||||
// Give him the new password
|
||||
@ -199,4 +209,4 @@ if ($config['mailserver']['accountRecovery']) {
|
||||
<p>The admin have disabled automatic account recovery.</p>
|
||||
<?php
|
||||
}
|
||||
include 'layout/overall/footer.php'; ?>
|
||||
include 'layout/overall/footer.php'; ?>
|
||||
|
Loading…
x
Reference in New Issue
Block a user