mirror of
https://github.com/slawkens/myaac.git
synced 2025-11-02 17:06:24 +01:00
[WIP] Refactor
This commit is contained in:
@@ -7,8 +7,8 @@ require __DIR__ . '/../base.php';
|
||||
|
||||
$title = 'Lost Account';
|
||||
|
||||
$email = $_REQUEST['email'];
|
||||
$nick = stripslashes($_REQUEST['nick']);
|
||||
$email = $_POST['email'] ?? '';
|
||||
$nick = $_POST['nick'] ?? '';
|
||||
|
||||
$player = new OTS_Player();
|
||||
$account = new OTS_Account();
|
||||
|
||||
@@ -5,10 +5,10 @@ csrfProtect();
|
||||
|
||||
$title = 'Lost Account';
|
||||
|
||||
$newPassword = $_REQUEST['password'];
|
||||
$passwordRepeat = $_REQUEST['password_repeat'];
|
||||
$code = $_REQUEST['code'];
|
||||
$character = stripslashes($_REQUEST['character']);
|
||||
$newPassword = $_POST['password'] ?? '';
|
||||
$passwordRepeat = $_POST['password_repeat'] ?? '';
|
||||
$code = $_POST['code'] ?? '';
|
||||
$character = $_POST['character'] ?? '';
|
||||
|
||||
if(empty($code) || empty($character) || empty($newPassword) || empty($passwordRepeat)) {
|
||||
$errors[] = 'Please enter code from e-mail and name of one character from account. Then press Submit.';
|
||||
|
||||
@@ -7,6 +7,8 @@ csrfProtect();
|
||||
|
||||
$title = 'Lost Account';
|
||||
|
||||
$nick = $_POST['nick'] ?? '';
|
||||
|
||||
if($account->isLoaded()) {
|
||||
if($account->getCustomField('email_next') < time()) {
|
||||
$twig->display('account/lost/email.html.twig', [
|
||||
|
||||
Reference in New Issue
Block a user