mirror of
https://github.com/slawkens/myaac.git
synced 2026-01-02 05:07:11 +01:00
[WIP] Refactor account lost
This commit is contained in:
@@ -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', [
|
||||||
|
|||||||
@@ -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()) {
|
||||||
|
|||||||
@@ -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');
|
||||||
|
|||||||
@@ -64,6 +64,8 @@ if($account->isLoaded()) {
|
|||||||
'newPassword' => $newPassword,
|
'newPassword' => $newPassword,
|
||||||
'newEmail' => $newEmail,
|
'newEmail' => $newEmail,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
return;
|
||||||
} else {
|
} else {
|
||||||
$errors[] = Validator::getLastError();
|
$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>
|
<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>
|
||||||
|
|||||||
Reference in New Issue
Block a user