[WIP] Refactor account lost

This commit is contained in:
slawkens
2026-01-01 08:40:48 +01:00
parent 85e54e709e
commit e425d597a8
5 changed files with 7 additions and 5 deletions

View File

@@ -5,8 +5,8 @@ csrfProtect();
$title = 'Lost Account'; $title = 'Lost Account';
$code = $_POST['code'] ?? ''; $code = $_REQUEST['code'] ?? '';
$character = $_POST['character'] ?? ''; $character = $_REQUEST['character'] ?? '';
if(empty($code) || empty($character)) { if(empty($code) || empty($character)) {
$twig->display('account/lost/check-code.html.twig', [ $twig->display('account/lost/check-code.html.twig', [

View File

@@ -7,7 +7,7 @@ csrfProtect();
$title = 'Lost Account'; $title = 'Lost Account';
$nick = $_POST['nick'] ?? ''; $nick = $_REQUEST['nick'] ?? '';
if($account->isLoaded()) { if($account->isLoaded()) {
if($account->getCustomField('email_next') < time()) { if($account->getCustomField('email_next') < time()) {

View File

@@ -5,7 +5,7 @@ csrfProtect();
$title = 'Lost Account'; $title = 'Lost Account';
$nick = $_POST['nick'] ?? ''; $nick = $_REQUEST['nick'] ?? '';
if($account->isLoaded()) { if($account->isLoaded()) {
$account_key = $account->getCustomField('key'); $account_key = $account->getCustomField('key');

View File

@@ -64,6 +64,8 @@ if($account->isLoaded()) {
'newPassword' => $newPassword, 'newPassword' => $newPassword,
'newEmail' => $newEmail, 'newEmail' => $newEmail,
]); ]);
return;
} else { } else {
$errors[] = Validator::getLastError(); $errors[] = Validator::getLastError();
} }

View File

@@ -30,7 +30,7 @@ Please enter e-mail to account with this character.<br/>
<label for="name">E-mail to account:</label> <label for="name">E-mail to account:</label>
</td> </td>
<td> <td>
<input type=text id="name" name="email" value="" size="40"> <input type="email" id="name" name="email" value="" size="40">
</td> </td>
</tr> </tr>
</table> </table>