mirror of
https://github.com/slawkens/myaac.git
synced 2025-11-02 17:06:24 +01:00
[WIP] Refactor
This commit is contained in:
@@ -5,6 +5,8 @@ csrfProtect();
|
||||
|
||||
$title = 'Lost Account';
|
||||
|
||||
$nick = $_POST['nick'] ?? '';
|
||||
|
||||
if($account->isLoaded()) {
|
||||
$account_key = $account->getCustomField('key');
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@ csrfProtect();
|
||||
|
||||
$title = 'Lost Account';
|
||||
|
||||
$key = trim($_REQUEST['key']);
|
||||
$nick = stripslashes($_REQUEST['nick']);
|
||||
$key = $_REQUEST['key'] ?? '';
|
||||
$nick = $_POST['nick'] ?? '';
|
||||
|
||||
$player = new OTS_Player();
|
||||
$account = new OTS_Account();
|
||||
@@ -32,8 +32,9 @@ if($account->isLoaded()) {
|
||||
$errors[] = 'Account of this character has no recovery key!';
|
||||
}
|
||||
}
|
||||
else
|
||||
$errors[] = "Player or account of player <b>" . escapeHtml($nick) . "</b> doesn't exist.";
|
||||
else {
|
||||
$errors[] = "Player or account of player <b>" . escapeHtml($nick) . "</b> doesn't exist.";
|
||||
}
|
||||
|
||||
if (!empty($errors)) {
|
||||
$twig->display('error_box.html.twig', [
|
||||
|
||||
@@ -5,11 +5,11 @@ csrfProtect();
|
||||
|
||||
$title = 'Lost Account';
|
||||
|
||||
$key = trim($_REQUEST['key']);
|
||||
$nick = stripslashes($_REQUEST['nick']);
|
||||
$newPassword = trim($_REQUEST['password']);
|
||||
$passwordRepeat = trim($_REQUEST['password_repeat']);
|
||||
$newEmail = trim($_REQUEST['email']);
|
||||
$key = $_POST['key'];
|
||||
$nick = $_POST['nick'] ?? '';
|
||||
$newPassword = $_POST['password'] ?? '';
|
||||
$passwordRepeat = $_POST['password_repeat'] ?? '';
|
||||
$newEmail = $_POST['email'] ?? '';
|
||||
|
||||
$player = new OTS_Player();
|
||||
$account = new OTS_Account();
|
||||
|
||||
Reference in New Issue
Block a user