mirror of
https://github.com/slawkens/myaac.git
synced 2026-01-01 20:57:12 +01:00
[WIP] Refactor account lost
This commit is contained in:
@@ -5,8 +5,8 @@ csrfProtect();
|
||||
|
||||
$title = 'Lost Account';
|
||||
|
||||
$code = $_POST['code'] ?? '';
|
||||
$character = $_POST['character'] ?? '';
|
||||
$code = $_REQUEST['code'] ?? '';
|
||||
$character = $_REQUEST['character'] ?? '';
|
||||
|
||||
if(empty($code) || empty($character)) {
|
||||
$twig->display('account/lost/check-code.html.twig', [
|
||||
|
||||
@@ -7,7 +7,7 @@ csrfProtect();
|
||||
|
||||
$title = 'Lost Account';
|
||||
|
||||
$nick = $_POST['nick'] ?? '';
|
||||
$nick = $_REQUEST['nick'] ?? '';
|
||||
|
||||
if($account->isLoaded()) {
|
||||
if($account->getCustomField('email_next') < time()) {
|
||||
|
||||
@@ -5,7 +5,7 @@ csrfProtect();
|
||||
|
||||
$title = 'Lost Account';
|
||||
|
||||
$nick = $_POST['nick'] ?? '';
|
||||
$nick = $_REQUEST['nick'] ?? '';
|
||||
|
||||
if($account->isLoaded()) {
|
||||
$account_key = $account->getCustomField('key');
|
||||
|
||||
@@ -64,6 +64,8 @@ if($account->isLoaded()) {
|
||||
'newPassword' => $newPassword,
|
||||
'newEmail' => $newEmail,
|
||||
]);
|
||||
|
||||
return;
|
||||
} else {
|
||||
$errors[] = Validator::getLastError();
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ Please enter e-mail to account with this character.<br/>
|
||||
<label for="name">E-mail to account:</label>
|
||||
</td>
|
||||
<td>
|
||||
<input type=text id="name" name="email" value="" size="40">
|
||||
<input type="email" id="name" name="email" value="" size="40">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
Reference in New Issue
Block a user