mirror of
https://github.com/slawkens/myaac.git
synced 2026-01-02 05:07:11 +01:00
[WIP] Refactor account lost - fixes
This commit is contained in:
@@ -6,6 +6,7 @@ csrfProtect();
|
|||||||
$title = 'Lost Account';
|
$title = 'Lost Account';
|
||||||
|
|
||||||
$nick = $_REQUEST['nick'] ?? '';
|
$nick = $_REQUEST['nick'] ?? '';
|
||||||
|
$key = $_REQUEST['key'] ?? '';
|
||||||
|
|
||||||
if($account->isLoaded()) {
|
if($account->isLoaded()) {
|
||||||
$account_key = $account->getCustomField('key');
|
$account_key = $account->getCustomField('key');
|
||||||
@@ -13,6 +14,7 @@ if($account->isLoaded()) {
|
|||||||
if(!empty($account_key)) {
|
if(!empty($account_key)) {
|
||||||
$twig->display('account/lost/recovery-key.step-1.html.twig', [
|
$twig->display('account/lost/recovery-key.step-1.html.twig', [
|
||||||
'nick' => $nick,
|
'nick' => $nick,
|
||||||
|
'key' => $key,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ csrfProtect();
|
|||||||
$title = 'Lost Account';
|
$title = 'Lost Account';
|
||||||
|
|
||||||
$key = $_REQUEST['key'] ?? '';
|
$key = $_REQUEST['key'] ?? '';
|
||||||
$nick = $_POST['nick'] ?? '';
|
$nick = $_REQUEST['nick'] ?? '';
|
||||||
|
|
||||||
$player = new OTS_Player();
|
$player = new OTS_Player();
|
||||||
$account = new OTS_Account();
|
$account = new OTS_Account();
|
||||||
@@ -45,5 +45,5 @@ if (!empty($errors)) {
|
|||||||
$twig->display('account.back_button.html.twig', [
|
$twig->display('account.back_button.html.twig', [
|
||||||
'new_line' => true,
|
'new_line' => true,
|
||||||
'center' => true,
|
'center' => true,
|
||||||
'action' => getLink('account/lost/step-1') . '?action=recovery-key&nick=' . urlencode($nick),
|
'action' => getLink('account/lost/step-1') . '?action=recovery-key&nick=' . urlencode($nick) . '&key=' . urlencode($key),
|
||||||
]);
|
]);
|
||||||
|
|||||||
@@ -99,5 +99,5 @@ if (!empty($errors)) {
|
|||||||
$twig->display('account.back_button.html.twig', [
|
$twig->display('account.back_button.html.twig', [
|
||||||
'new_line' => true,
|
'new_line' => true,
|
||||||
'center' => true,
|
'center' => true,
|
||||||
'action' => getLink('account/lost/step-1') . '?action=recovery-key&nick=' . urlencode($nick),
|
'action' => getLink('account/lost/recovery-key/step-2') . '?nick=' . urlencode($nick) . '&key=' . urlencode($key),
|
||||||
]);
|
]);
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ If you enter right recovery key you will see form to set new e-mail and password
|
|||||||
<label for="key">Recovery key:</label>
|
<label for="key">Recovery key:</label>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<input type="text" id="key" name="key" value="" size="40">
|
<input type="text" id="key" name="key" value="{{ key }}" size="40">
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
Reference in New Issue
Block a user