mirror of
https://github.com/Znote/ZnoteAAC.git
synced 2025-06-16 09:44:30 +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
10
recovery.php
10
recovery.php
@ -32,7 +32,12 @@ if ($config['mailserver']['accountRecovery']) {
|
|||||||
}
|
}
|
||||||
$password = sha1($salt.$password);
|
$password = sha1($salt.$password);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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;");
|
$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) {
|
if ($user !== false) {
|
||||||
// Found user
|
// Found user
|
||||||
|
|
||||||
@ -72,7 +77,12 @@ if ($config['mailserver']['accountRecovery']) {
|
|||||||
}
|
}
|
||||||
$password = sha1($salt.$newpass);
|
$password = sha1($salt.$newpass);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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;");
|
$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) {
|
if ($user !== false) {
|
||||||
// Found user
|
// Found user
|
||||||
// Give him the new password
|
// Give him the new password
|
||||||
|
Loading…
x
Reference in New Issue
Block a user