mirror of
https://github.com/slawkens/myaac.git
synced 2025-10-14 17:54:55 +02:00
[WIP] Refactor account/lost
This commit is contained in:
@@ -11,37 +11,9 @@
|
|||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
$title = 'Lost Account Interface';
|
$title = 'Lost Account Interface';
|
||||||
|
|
||||||
if(!setting('core.mail_enabled'))
|
if(!setting('core.mail_enabled')) {
|
||||||
{
|
echo "<b>Account maker is not configured to send e-mails, you can't use Lost Account Interface. Contact with admin to get help.</b>";
|
||||||
echo '<b>Account maker is not configured to send e-mails, you can\'t use Lost Account Interface. Contact with admin to get help.</b>';
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$action_type = $_REQUEST['action_type'] ?? '';
|
$twig->display('account/lost/form.html.twig');
|
||||||
if($action == '') {
|
|
||||||
$twig->display('account.lost.form.html.twig');
|
|
||||||
}
|
|
||||||
else if($action == 'step1' && $action_type == '') {
|
|
||||||
$twig->display('account.lost.noaction.html.twig');
|
|
||||||
}
|
|
||||||
elseif($action == 'step1' && $action_type == 'email') {
|
|
||||||
require PAGES . 'account/lost/step1-email.php';
|
|
||||||
}
|
|
||||||
elseif($action == 'send-code') {
|
|
||||||
require PAGES . 'account/lost/send-code.php';
|
|
||||||
}
|
|
||||||
elseif($action == 'step1' && $action_type == 'reckey') {
|
|
||||||
require PAGES . 'account/lost/step1-reckey.php';
|
|
||||||
}
|
|
||||||
elseif($action == 'step2') {
|
|
||||||
require PAGES . 'account/lost/step2.php';
|
|
||||||
}
|
|
||||||
elseif($action == 'step3') {
|
|
||||||
require PAGES . 'account/lost/step3.php';
|
|
||||||
}
|
|
||||||
elseif($action == 'check-code') {
|
|
||||||
require PAGES . 'account/lost/check-code.php';
|
|
||||||
}
|
|
||||||
elseif($action == 'set-new-password') {
|
|
||||||
require PAGES . 'account/lost/set-new-password.php';
|
|
||||||
}
|
|
||||||
|
@@ -1,9 +1,11 @@
|
|||||||
<?php
|
<?php
|
||||||
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
|
||||||
$code = isset($_REQUEST['code']) ? trim($_REQUEST['code']) : '';
|
$code = isset($_REQUEST['code']) ? trim($_REQUEST['code']) : '';
|
||||||
$character = isset($_REQUEST['character']) ? stripslashes(trim($_REQUEST['character'])) : '';
|
$character = isset($_REQUEST['character']) ? stripslashes(trim($_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', [
|
||||||
'code' => $code,
|
'code' => $code,
|
||||||
'characters' => $character,
|
'characters' => $character,
|
||||||
]);
|
]);
|
||||||
@@ -18,22 +20,10 @@ else
|
|||||||
|
|
||||||
if($account->isLoaded()) {
|
if($account->isLoaded()) {
|
||||||
if($account->getCustomField('email_code') == $code) {
|
if($account->getCustomField('email_code') == $code) {
|
||||||
echo '
|
$twig->display('account/lost/check-code.finish.html.twig', [
|
||||||
Please enter new password to your account and repeat to make sure you remember password.<BR>
|
'character' => $character,
|
||||||
<FORM ACTION="' . getLink('account/lost') . '?action=setnewpassword" METHOD=post>
|
'code' => $code,
|
||||||
<INPUT TYPE=hidden NAME="character" VALUE="'.$character.'">
|
]);
|
||||||
<INPUT TYPE=hidden NAME="code" VALUE="'.$code.'">
|
|
||||||
<TABLE CELLSPACING=1 CELLPADDING=4 BORDER=0 WIDTH=100%>
|
|
||||||
<TR><TD BGCOLOR="'.$config['vdarkborder'].'" class="white"><B>Passwords</B></TD></TR>
|
|
||||||
<TR><TD BGCOLOR="'.$config['darkborder'].'">
|
|
||||||
New password: <INPUT TYPE=password ID="passor" NAME="passor" VALUE="" SIZE="40"><BR />
|
|
||||||
Repeat new password: <INPUT TYPE=password ID="passor2" NAME="passor2" VALUE="" SIZE="40"><BR />
|
|
||||||
</TD></TR>
|
|
||||||
</TABLE>
|
|
||||||
<BR>
|
|
||||||
<TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0 WIDTH=100%><TR><TD><div style="text-align:center">
|
|
||||||
' . $twig->render('buttons.submit.html.twig') . '</div>
|
|
||||||
</TD></TR></FORM></TABLE></TABLE>';
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$error = 'Wrong code to change password.';
|
$error = 'Wrong code to change password.';
|
||||||
@@ -51,7 +41,7 @@ if(!empty($error)) {
|
|||||||
|
|
||||||
echo '<br/>';
|
echo '<br/>';
|
||||||
|
|
||||||
$twig->display('account.lost.check-code.html.twig', [
|
$twig->display('account/lost/check-code.html.twig', [
|
||||||
|
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
|
||||||
$email = $_REQUEST['email'];
|
$email = $_REQUEST['email'];
|
||||||
$nick = stripslashes($_REQUEST['nick']);
|
$nick = stripslashes($_REQUEST['nick']);
|
||||||
@@ -37,12 +38,14 @@ if($account->isLoaded()) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$insec = (int)$account->getCustomField('email_next') - time();
|
$inSec = (int)$account->getCustomField('email_next') - time();
|
||||||
$minutesleft = floor($insec / 60);
|
$minutesLeft = floor($inSec / 60);
|
||||||
$secondsleft = $insec - ($minutesleft * 60);
|
$secondsLeft = $inSec - ($minutesLeft * 60);
|
||||||
$timeleft = $minutesleft.' minutes '.$secondsleft.' seconds';
|
$timeLeft = $minutesLeft.' minutes '.$secondsLeft.' seconds';
|
||||||
|
|
||||||
echo 'Account of selected character (<b>' . htmlspecialchars($nick) . '</b>) received e-mail in last '.ceil(setting('core.mail_lost_account_interval') / 60) . ' minutes. You must wait '.$timeleft.' before you can use Lost Account Interface again.';
|
$timeRounded = ceil(setting('core.mail_lost_account_interval') / 60);
|
||||||
|
|
||||||
|
echo "Account of selected character (<b>" . escapeHtml($nick) . "</b>) received e-mail in last $timeRounded minutes. You must wait $timeLeft before you can use Lost Account Interface again.";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
@@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
|
||||||
$newPassword = $_REQUEST['passor'];
|
$newPassword = $_REQUEST['passor'];
|
||||||
$code = $_REQUEST['code'];
|
$code = $_REQUEST['code'];
|
||||||
$character = stripslashes($_REQUEST['character']);
|
$character = stripslashes($_REQUEST['character']);
|
||||||
@@ -9,7 +11,7 @@ if(empty($code) || empty($character) || empty($newPassword)) {
|
|||||||
$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') . '?action=check-code',
|
'action' => getLink('account/lost/check-code')
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -21,15 +23,11 @@ else
|
|||||||
$account = $player->getAccount();
|
$account = $player->getAccount();
|
||||||
}
|
}
|
||||||
|
|
||||||
if($account->isLoaded())
|
if($account->isLoaded()) {
|
||||||
{
|
if($account->getCustomField('email_code') == $code) {
|
||||||
if($account->getCustomField('email_code') == $code)
|
if(Validator::password($newPassword)) {
|
||||||
{
|
|
||||||
if(Validator::password($newPassword))
|
|
||||||
{
|
|
||||||
$tmp_new_pass = $newPassword;
|
$tmp_new_pass = $newPassword;
|
||||||
if(USE_ACCOUNT_SALT)
|
if(USE_ACCOUNT_SALT) {
|
||||||
{
|
|
||||||
$salt = generateRandomString(10, false, true, true);
|
$salt = generateRandomString(10, false, true, true);
|
||||||
$tmp_new_pass = $salt . $newPassword;
|
$tmp_new_pass = $salt . $newPassword;
|
||||||
$account->setCustomField('salt', $salt);
|
$account->setCustomField('salt', $salt);
|
||||||
@@ -52,19 +50,22 @@ else
|
|||||||
$statusMsg = '<br /><p class="error">New password work! An error occurred while sending email! You will not receive e-mail with new password. For Admin: More info can be found in system/logs/mailer-error.log';
|
$statusMsg = '<br /><p class="error">New password work! An error occurred while sending email! You will not receive e-mail with new password. For Admin: More info can be found in system/logs/mailer-error.log';
|
||||||
}
|
}
|
||||||
|
|
||||||
$twig->display('account.lost.finish.new-password.html.twig', [
|
$twig->display('account/lost/finish.new-password.html.twig', [
|
||||||
'statusMsg' => $statusMsg,
|
'statusMsg' => $statusMsg,
|
||||||
'newPassword' => $newPassword,
|
'newPassword' => $newPassword,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
$error= Validator::getLastError();
|
$error = Validator::getLastError();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$error = 'Wrong code to change password.';
|
||||||
}
|
}
|
||||||
else
|
|
||||||
$error= 'Wrong code to change password.';
|
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
$error = 'Account of this character or this character doesn\'t exist.';
|
$error = "Account of this character or this character doesn't exist.";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!empty($error)) {
|
if(!empty($error)) {
|
||||||
@@ -74,7 +75,7 @@ if(!empty($error)) {
|
|||||||
|
|
||||||
echo '<br/>';
|
echo '<br/>';
|
||||||
|
|
||||||
$twig->display('account.lost.check-code.html.twig', [
|
$twig->display('account/lost/check-code.html.twig', [
|
||||||
'code' => $code,
|
'code' => $code,
|
||||||
'character' => $character,
|
'character' => $character,
|
||||||
]);
|
]);
|
28
system/pages/account/lost/email/step-1.php
Normal file
28
system/pages/account/lost/email/step-1.php
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
if($account->isLoaded()) {
|
||||||
|
if($account->getCustomField('email_next') < time()) {
|
||||||
|
$twig->display('account/lost/email.html.twig', [
|
||||||
|
'nick' => $nick,
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$inSec = (int)$account->getCustomField('email_next') - time();
|
||||||
|
$minutesLeft = floor($inSec / 60);
|
||||||
|
$secondsLeft = $inSec - ($minutesLeft * 60);
|
||||||
|
$timeLeft = $minutesLeft.' minutes '.$secondsLeft.' seconds';
|
||||||
|
|
||||||
|
$timeRounded = ceil(setting('core.mail_lost_account_interval') / 60);
|
||||||
|
|
||||||
|
echo "Account of selected character (<b>" . escapeHtml($nick) . "</b>) received e-mail in last $timeRounded minutes. You must wait $timeLeft before you can use Lost Account Interface again.";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
echo "Player or account of player <b>" . escapeHtml($nick) . "</b> doesn't exist.";
|
||||||
|
}
|
||||||
|
|
||||||
|
$twig->display('account.back_button.html.twig', [
|
||||||
|
'new_line' => true,
|
||||||
|
'center' => true,
|
||||||
|
'action' => getLink('account/lost'),
|
||||||
|
]);
|
24
system/pages/account/lost/recovery-key/step-1.php
Normal file
24
system/pages/account/lost/recovery-key/step-1.php
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
<?php
|
||||||
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
|
||||||
|
if($account->isLoaded()) {
|
||||||
|
$account_key = $account->getCustomField('key');
|
||||||
|
|
||||||
|
if(!empty($account_key)) {
|
||||||
|
$twig->display('account/lost/recovery-key.html.twig', [
|
||||||
|
'nick' => $nick,
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
echo 'Account of this character has no recovery key!';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
echo "Player or account of player <b>" . escapeHtml($nick) . "</b> doesn't exist.";
|
||||||
|
}
|
||||||
|
|
||||||
|
$twig->display('account.back_button.html.twig', [
|
||||||
|
'new_line' => true,
|
||||||
|
'center' => true,
|
||||||
|
'action' => getLink('account/lost'),
|
||||||
|
]);
|
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
|
||||||
$recKey = trim($_REQUEST['key']);
|
$recKey = trim($_REQUEST['key']);
|
||||||
$nick = stripslashes($_REQUEST['nick']);
|
$nick = stripslashes($_REQUEST['nick']);
|
||||||
@@ -14,7 +15,7 @@ if($account->isLoaded()) {
|
|||||||
$accountKey = $account->getCustomField('key');
|
$accountKey = $account->getCustomField('key');
|
||||||
if(!empty($accountKey)) {
|
if(!empty($accountKey)) {
|
||||||
if($accountKey == $recKey) {
|
if($accountKey == $recKey) {
|
||||||
$twig->display('account.lost.step2.html.twig', [
|
$twig->display('account/lost/step2.html.twig', [
|
||||||
'nick' => $nick,
|
'nick' => $nick,
|
||||||
'recKey' => $recKey,
|
'recKey' => $recKey,
|
||||||
]);
|
]);
|
||||||
@@ -28,7 +29,7 @@ if($account->isLoaded()) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
echo "Player or account of player <b>" . htmlspecialchars($nick) . "</b> doesn't exist.";
|
echo "Player or account of player <b>" . escapeHtml($nick) . "</b> doesn't exist.";
|
||||||
|
|
||||||
$twig->display('account.back_button.html.twig', [
|
$twig->display('account.back_button.html.twig', [
|
||||||
'new_line' => true,
|
'new_line' => true,
|
@@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
|
||||||
$recKey = trim($_REQUEST['key']);
|
$recKey = trim($_REQUEST['key']);
|
||||||
$nick = stripslashes($_REQUEST['nick']);
|
$nick = stripslashes($_REQUEST['nick']);
|
||||||
$newPassword = trim($_REQUEST['passor']);
|
$newPassword = trim($_REQUEST['passor']);
|
||||||
@@ -11,9 +13,9 @@ if($player->isLoaded()) {
|
|||||||
$account = $player->getAccount();
|
$account = $player->getAccount();
|
||||||
}
|
}
|
||||||
|
|
||||||
if($account->isLoaded())
|
if($account->isLoaded()) {
|
||||||
{
|
|
||||||
$accountKey = $account->getCustomField('key');
|
$accountKey = $account->getCustomField('key');
|
||||||
|
|
||||||
if(!empty($accountKey)) {
|
if(!empty($accountKey)) {
|
||||||
if($accountKey == $recKey) {
|
if($accountKey == $recKey) {
|
||||||
if(Validator::password($newPassword)) {
|
if(Validator::password($newPassword)) {
|
||||||
@@ -53,7 +55,7 @@ if($account->isLoaded())
|
|||||||
$statusMsg = '<br /><small>You will not receive e-mail with this informations.</small>';
|
$statusMsg = '<br /><small>You will not receive e-mail with this informations.</small>';
|
||||||
}
|
}
|
||||||
|
|
||||||
$twig->display('account.lost.finish.new-email.html.twig', [
|
$twig->display('account/lost/finish.new-email.html.twig', [
|
||||||
'statusMsg' => $statusMsg,
|
'statusMsg' => $statusMsg,
|
||||||
'account' => $account,
|
'account' => $account,
|
||||||
'newPassword' => $newPassword,
|
'newPassword' => $newPassword,
|
||||||
@@ -77,7 +79,7 @@ if($account->isLoaded())
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
echo "Player or account of player <b>" . htmlspecialchars($nick) . "</b> doesn't exist.";
|
echo "Player or account of player <b>" . escapeHtml($nick) . "</b> doesn't exist.";
|
||||||
}
|
}
|
||||||
|
|
||||||
$twig->display('account.back_button.html.twig', [
|
$twig->display('account.back_button.html.twig', [
|
22
system/pages/account/lost/step-1.php
Normal file
22
system/pages/account/lost/step-1.php
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
<?php
|
||||||
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
|
||||||
|
$nick = stripslashes($_REQUEST['nick']);
|
||||||
|
|
||||||
|
$player = new OTS_Player();
|
||||||
|
$account = new OTS_Account();
|
||||||
|
$player->find($nick);
|
||||||
|
if($player->isLoaded()) {
|
||||||
|
$account = $player->getAccount();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ACTION == 'email') {
|
||||||
|
require __DIR__ . '/email/step-1.php';
|
||||||
|
}
|
||||||
|
else if (ACTION == 'recovery-key') {
|
||||||
|
require __DIR__ . '/recovery-key/step-1.php';
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$twig->display('account/lost/no-action.html.twig');
|
||||||
|
}
|
||||||
|
|
@@ -1,36 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
$nick = stripslashes($_REQUEST['nick']);
|
|
||||||
|
|
||||||
$player = new OTS_Player();
|
|
||||||
$account = new OTS_Account();
|
|
||||||
$player->find($nick);
|
|
||||||
if($player->isLoaded()) {
|
|
||||||
$account = $player->getAccount();
|
|
||||||
}
|
|
||||||
|
|
||||||
if($account->isLoaded()) {
|
|
||||||
if($account->getCustomField('email_next') < time()) {
|
|
||||||
$twig->display('account.lost.step1-email.html.twig', [
|
|
||||||
'nick' => $nick,
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$insec = (int)$account->getCustomField('email_next') - time();
|
|
||||||
$minutesleft = floor($insec / 60);
|
|
||||||
$secondsleft = $insec - ($minutesleft * 60);
|
|
||||||
$timeleft = $minutesleft.' minutes '.$secondsleft.' seconds';
|
|
||||||
|
|
||||||
echo 'Account of selected character (<b>'.$nick.'</b>) received e-mail in last '.ceil(setting('core.mail_lost_account_interval') / 60).' minutes. You must wait '.$timeleft.' before you can use Lost Account Interface again.';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
echo "Player or account of player <b>" . htmlspecialchars($nick) . "</b> doesn't exist.";
|
|
||||||
}
|
|
||||||
|
|
||||||
$twig->display('account.back_button.html.twig', [
|
|
||||||
'new_line' => true,
|
|
||||||
'center' => true,
|
|
||||||
'action' => getLink('account/lost'),
|
|
||||||
]);
|
|
@@ -1,39 +0,0 @@
|
|||||||
<?php
|
|
||||||
$nick = stripslashes($_REQUEST['nick']);
|
|
||||||
|
|
||||||
$player = new OTS_Player();
|
|
||||||
$account = new OTS_Account();
|
|
||||||
$player->find($nick);
|
|
||||||
if($player->isLoaded())
|
|
||||||
$account = $player->getAccount();
|
|
||||||
if($account->isLoaded())
|
|
||||||
{
|
|
||||||
$account_key = $account->getCustomField('key');
|
|
||||||
if(!empty($account_key))
|
|
||||||
{
|
|
||||||
echo 'If you enter right recovery key you will see form to set new e-mail and password to account. To this e-mail will be send your new password and account name.<BR>
|
|
||||||
<FORM ACTION="' . getLink('account/lost') . '?action=step2" METHOD=post>
|
|
||||||
<TABLE CELLSPACING=1 CELLPADDING=4 BORDER=0 WIDTH=100%>
|
|
||||||
<TR><TD BGCOLOR="'.$config['vdarkborder'].'" class="white"><B>Please enter your recovery key</B></TD></TR>
|
|
||||||
<TR><TD BGCOLOR="'.$config['darkborder'].'">
|
|
||||||
Character name: <INPUT TYPE=text NAME="nick" VALUE="'.$nick.'" SIZE="40" readonly="readonly"><BR />
|
|
||||||
Recovery key: <INPUT TYPE=text NAME="key" VALUE="" SIZE="40"><BR>
|
|
||||||
</TD></TR>
|
|
||||||
</TABLE>
|
|
||||||
<BR>
|
|
||||||
<TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0 WIDTH=100%><TR><TD><div style="text-align:center">
|
|
||||||
' . $twig->render('buttons.submit.html.twig') . '</div>
|
|
||||||
</TD></TR></FORM></TABLE></TABLE>';
|
|
||||||
}
|
|
||||||
else
|
|
||||||
echo 'Account of this character has no recovery key!';
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
echo 'Player or account of player <b>' . htmlspecialchars($nick) . '</b> doesn\'t exist.';
|
|
||||||
}
|
|
||||||
|
|
||||||
$twig->display('account.back_button.html.twig', [
|
|
||||||
'new_line' => true,
|
|
||||||
'center' => true,
|
|
||||||
'action' => getLink('account/lost'),
|
|
||||||
]);
|
|
@@ -1,23 +0,0 @@
|
|||||||
New password to your account is below. Now you can login.<BR>
|
|
||||||
<table cellspacing="1" cellpadding="4" border="0" width="100%">
|
|
||||||
<tr>
|
|
||||||
<td bgcolor="{{ config('vdarkborder') }}" class="white"><b>Changed password</b></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td bgcolor="{{ config('darkborder') }}">
|
|
||||||
New password: <b>{{ newPassword }}</b><br/>
|
|
||||||
Account name: <i>(Already on your e-mail)</i><br/>
|
|
||||||
{{ statusMsg|raw }}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<br/>
|
|
||||||
<table cellspacing="0" cellpadding="0" border="0" width="100%">
|
|
||||||
<tr>
|
|
||||||
<td align="center">
|
|
||||||
<form action="{{ getlink('account/manage') }}" method="post">
|
|
||||||
{{ include('buttons.submit.html.twig') }}
|
|
||||||
</form>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
@@ -1,36 +0,0 @@
|
|||||||
The Lost Account Interface can help you to get back your account name and password. Please enter your character name and select what you want to do.<br/>
|
|
||||||
<form action="{{ getLink('account/lost') }}?action=step1" method="post">
|
|
||||||
{{ csrf() }}
|
|
||||||
<input type="hidden" name="character" value="">
|
|
||||||
<table cellspacing="1" cellpadding="4" border="0" width="100%">
|
|
||||||
<tr>
|
|
||||||
<td bgcolor="{{ config.vdarkborder }}" class="white"><b>Please enter your character name</b></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td bgcolor="{{ config.darkborder }}">
|
|
||||||
<input type="text" name="nick" size="40" autofocus/><br>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<table cellspacing="1" cellpadding="4" border="0" width="100%">
|
|
||||||
<tr>
|
|
||||||
<td bgcolor="{{ config.vdarkborder }}" class="white"><b>What do you want?</b></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td bgcolor="{{ config.darkborder }}">
|
|
||||||
<input type="radio" name="action_type" id="action_type_email" value="email">
|
|
||||||
<label for="action_type_email"> Send me new password and my account name to account e-mail adress.</label><br/>
|
|
||||||
<input type=radio name="action_type" id="action_type_key" value="reckey">
|
|
||||||
<label for="action_type_key"> I got <b>recovery key</b> and want set new password and e-mail adress to my account.</label><br/>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<br/>
|
|
||||||
<table cellspacing="0" cellpadding="0" border="0" width="100%">
|
|
||||||
<tr>
|
|
||||||
<td align="center">
|
|
||||||
{{ include('buttons.submit.html.twig') }}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</form>
|
|
@@ -1,10 +0,0 @@
|
|||||||
Please select action.<br/>
|
|
||||||
<table cellspacing="0" cellpadding="0" border="0" width="100%">
|
|
||||||
<tr>
|
|
||||||
<td align="center">
|
|
||||||
<a href="{{ getLink('account/lost') }}" border="0">
|
|
||||||
{{ include('buttons.back.html.twig') }}
|
|
||||||
</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
@@ -1,23 +0,0 @@
|
|||||||
Please enter e-mail to account with this character.<br/>
|
|
||||||
<form action="{{ getLink('account/lost') }}?action=send-code" method="post">
|
|
||||||
<input type=hidden name="character">
|
|
||||||
<table cellspacing=1 cellpadding=4 border=0 width=100%>
|
|
||||||
<tr>
|
|
||||||
<td bgcolor="{{ config('vdarkborder') }}" class="white"><b>Please enter e-mail to account</b></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td bgcolor="{{ config('darkborder') }}">
|
|
||||||
Character: <input type=text name="nick" value="{{ nick }}" size="40" readonly="readonly"><br/>
|
|
||||||
E-mail to account: <input type=text name="email" value="" size="40"><br/>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<br>
|
|
||||||
<table cellspacing=0 cellpadding=0 border=0 width=100%>
|
|
||||||
<tr>
|
|
||||||
<td><div style="text-align:center">
|
|
||||||
{{ include('buttons.submit.html.twig') }}</div>
|
|
||||||
</TD>
|
|
||||||
</TR>
|
|
||||||
</table>
|
|
||||||
</form>
|
|
26
system/templates/account/lost/check-code.finish.html.twig
Normal file
26
system/templates/account/lost/check-code.finish.html.twig
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
Please enter new password to your account and repeat to make sure you remember password.<BR>
|
||||||
|
<form action="{{ getLink('account/lost/email/set-new-password') }}" method="post">
|
||||||
|
<input type="hidden" name="character" value="{{ character }}">
|
||||||
|
<input type="hidden" name="code" value="{{ code }}">
|
||||||
|
<table style="width: 100%; border-spacing: 1px">
|
||||||
|
<tr>
|
||||||
|
<td style="padding: 4px; background: {{ config('vdarkborder') }}" class="white"><B>Passwords</B></td></tr>
|
||||||
|
<TR>
|
||||||
|
<td style="padding: 4px; background: {{ config('darkborder') }}">
|
||||||
|
New password: <input type="password" ID="passor" name="passor" value="" size="40"><br/>
|
||||||
|
Repeat new password: <input TYPE="password" ID="passor2" name="passor2" value="" size="40"><br/>
|
||||||
|
</td>
|
||||||
|
</TR>
|
||||||
|
</table>
|
||||||
|
<br/>
|
||||||
|
<table style="width: 100%">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<div style="text-align: center">
|
||||||
|
{% set button_name = 'Submit' %}
|
||||||
|
{% include('buttons.base.html.twig') %}
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</form>
|
@@ -1,23 +1,24 @@
|
|||||||
Please enter code from e-mail and name of one character from account. Then press Submit.<br/>
|
Please enter code from e-mail and name of one character from account. Then press Submit.<br/>
|
||||||
<form action="{{ getLink('account/lost') }}?action=check-code" method="post">
|
<form action="{{ getLink('account/lost/check-code') }}" method="post">
|
||||||
<table cellspacing="1" cellpadding="4" border="0" width="100%">
|
<table style="width: 100%; border-spacing: 1px">
|
||||||
<tr>
|
<tr>
|
||||||
<td bgcolor="{{ config('vdarkborder') }}" class="white">
|
<td style="padding: 4px; background: {{ config('vdarkborder') }}" class="white">
|
||||||
<b>Code & character name</b>
|
<b>Code & character name</b>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td bgcolor="{{ config('darkborder') }}">
|
<td style="padding: 4px; background: {{ config('darkborder') }}">
|
||||||
Your code: <input type="text" name="code" value="{{ code }}" size="40"><br/>
|
Your code: <input type="text" name="code" value="{{ code }}" size="40"><br/>
|
||||||
Character: <input type="text" name="character" value="{{ character }}" size="40"><br/>
|
Character: <input type="text" name="character" value="{{ character }}" size="40"><br/>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<br>
|
<br>
|
||||||
<table cellspacing="0" cellpadding="0" border="0" width="100%">
|
<table style="width: 100%">
|
||||||
<tr>
|
<tr>
|
||||||
<td align="center">
|
<td align="center">
|
||||||
{{ include('buttons.submit.html.twig') }}
|
{% set button_name = 'Submit' %}
|
||||||
|
{% include('buttons.base.html.twig') %}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
26
system/templates/account/lost/email.html.twig
Normal file
26
system/templates/account/lost/email.html.twig
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
Please enter e-mail to account with this character.<br/>
|
||||||
|
<form action="{{ getLink('account/lost/email/send-code') }}" method="post">
|
||||||
|
<input type=hidden name="character">
|
||||||
|
<table style="width: 100%; border-spacing: 1px">
|
||||||
|
<tr>
|
||||||
|
<td style="padding: 4px; background: {{ config('vdarkborder') }}" class="white"><b>Please enter e-mail to account</b></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="padding: 4px; background: {{ config('darkborder') }}">
|
||||||
|
Character: <input type=text name="nick" value="{{ nick }}" size="40" readonly="readonly"><br/>
|
||||||
|
E-mail to account: <input type=text name="email" value="" size="40"><br/>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<br>
|
||||||
|
<table style="width: 100%">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<div style="text-align:center">
|
||||||
|
{% set button_name = 'Submit' %}
|
||||||
|
{% include('buttons.base.html.twig') %}
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</form>
|
@@ -1,12 +1,12 @@
|
|||||||
Your account name, new password and new e-mail.<br/>
|
Your account name, new password and new e-mail.<br/>
|
||||||
<table cellspacing="1" cellpadding="4" border="0" width="100%">
|
<table style="width: 100%; border-spacing: 1px">
|
||||||
<tr>
|
<tr>
|
||||||
<td bgcolor="{{ config('vdarkborder') }}" class="white">
|
<td style="padding: 4px; background: {{ config('vdarkborder') }}" class="white">
|
||||||
<b>Your account name, new password and new e-mail</b>
|
<b>Your account name, new password and new e-mail</b>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td bgcolor="{{ config('darkborder') }}">
|
<td style="padding: 4px; background: {{ config('darkborder') }}">
|
||||||
Account name: <b>{{ account.getName() }}</b><br/>
|
Account name: <b>{{ account.getName() }}</b><br/>
|
||||||
New password: <b>{{ newPassword }}</b><br/>
|
New password: <b>{{ newPassword }}</b><br/>
|
||||||
New e-mail address: <b>{{ newEmail }}</b><br/>
|
New e-mail address: <b>{{ newEmail }}</b><br/>
|
||||||
@@ -15,7 +15,7 @@ Your account name, new password and new e-mail.<br/>
|
|||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<br>
|
<br>
|
||||||
<table cellspacing="0" cellpadding="0" border="0" width="100%">
|
<table style="width: 100%">
|
||||||
<tr>
|
<tr>
|
||||||
<td align="center">
|
<td align="center">
|
||||||
<form action="{{ getLink('account/manage') }}" method="post">
|
<form action="{{ getLink('account/manage') }}" method="post">
|
24
system/templates/account/lost/finish.new-password.html.twig
Normal file
24
system/templates/account/lost/finish.new-password.html.twig
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
New password to your account is below. Now you can log in.<BR>
|
||||||
|
<table style="width: 100%; border-spacing: 1px">
|
||||||
|
<tr>
|
||||||
|
<td style="padding: 4px; background: {{ config('vdarkborder') }}" class="white"><b>Changed password</b></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="padding: 4px; background: {{ config('darkborder') }}">
|
||||||
|
New password: <b>{{ newPassword }}</b><br/>
|
||||||
|
Account name: <i>(Already on your e-mail)</i><br/>
|
||||||
|
{{ statusMsg|raw }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<br/>
|
||||||
|
<table style="width: 100%">
|
||||||
|
<tr>
|
||||||
|
<td align="center">
|
||||||
|
<form action="{{ getLink('account/manage') }}">
|
||||||
|
{% set button_name = 'Login' %}
|
||||||
|
{% include('buttons.base.html.twig') %}
|
||||||
|
</form>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
37
system/templates/account/lost/form.html.twig
Normal file
37
system/templates/account/lost/form.html.twig
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
The Lost Account Interface can help you to get back your account name and password. Please enter your character name and select what you want to do.<br/>
|
||||||
|
<form action="{{ getLink('account/lost/step-1') }}" method="post">
|
||||||
|
{{ csrf() }}
|
||||||
|
<input type="hidden" name="character" value="">
|
||||||
|
<table style="width: 100%; border-spacing: 1px">
|
||||||
|
<tr>
|
||||||
|
<td style="padding: 4px; background: {{ config('vdarkborder') }}" class="white"><b>Please enter your character name</b></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="padding: 4px; background: {{ config('darkborder') }}">
|
||||||
|
<input type="text" name="nick" size="40" autofocus/><br>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<table style="width: 100%; border-spacing: 1px">
|
||||||
|
<tr>
|
||||||
|
<td style="padding: 4px; background: {{ config('vdarkborder') }}" class="white"><b>What do you want?</b></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="padding: 4px; background: {{ config('darkborder') }}">
|
||||||
|
<input type="radio" name="action" id="action_type_email" value="email">
|
||||||
|
<label for="action_type_email"> Send me new password and my account name to account e-mail address.</label><br/>
|
||||||
|
<input type=radio name="action" id="action_type_key" value="recovery-key">
|
||||||
|
<label for="action_type_key"> I got <b>recovery key</b> and want set new password and e-mail address to my account.</label><br/>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<br/>
|
||||||
|
<table style="width: 100%">
|
||||||
|
<tr>
|
||||||
|
<td align="center">
|
||||||
|
{% set button_name = 'Submit' %}
|
||||||
|
{% include('buttons.base.html.twig') %}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</form>
|
10
system/templates/account/lost/no-action.html.twig
Normal file
10
system/templates/account/lost/no-action.html.twig
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
Please select action.<br/>
|
||||||
|
<table style="width: 100%">
|
||||||
|
<tr>
|
||||||
|
<td align="center">
|
||||||
|
<a href="{{ getLink('account/lost') }}">
|
||||||
|
{{ include('buttons.back.html.twig') }}
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
27
system/templates/account/lost/recovery-key.html.twig
Normal file
27
system/templates/account/lost/recovery-key.html.twig
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
If you enter right recovery key you will see form to set new e-mail and password to account. To this e-mail will be send your new password and account name.<BR>
|
||||||
|
<form action="{{ getLink('account/lost/recovery-key/step-2') }}" method="post">
|
||||||
|
<table style="width: 100%; border-spacing: 1px">
|
||||||
|
<tr>
|
||||||
|
<td style="padding: 4px; background: {{ config('vdarkborder') }}" class="white">
|
||||||
|
<b>Please enter your recovery key</b>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="padding: 4px; background: {{ config('darkborder') }}">
|
||||||
|
Character name: <input type=text name="nick" value="{{ nick }}" size="40" readonly="readonly"><br/>
|
||||||
|
Recovery key: <input type="text" name="key" value="" size="40"><br/>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<br>
|
||||||
|
<table style="width: 100%">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<div style="text-align:center">
|
||||||
|
{% set button_name = 'Submit' %}
|
||||||
|
{% include('buttons.base.html.twig') %}
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</form>
|
@@ -1,26 +1,28 @@
|
|||||||
Set new password and e-mail to your account.<br>
|
Set new password and e-mail to your account.<br>
|
||||||
<form action="{{ getLink('account/lost') }}?action=step3" method="post">
|
<form action="{{ getLink('account/lost/step-3') }}" method="post">
|
||||||
<input type="hidden" name="character" value="">
|
<input type="hidden" name="character" value="">
|
||||||
<table cellspacing="1" cellpadding="4" border="0" width="100%">
|
<table cellspacing="1" width="100%">
|
||||||
<tr>
|
<tr>
|
||||||
<td bgcolor="{{ config('vdarkborder') }}" class="white">
|
<td style="padding: 4px; background: {{ config('vdarkborder') }}" class="white">
|
||||||
<b>Please enter new password and e-mail</b>
|
<b>Please enter new password and e-mail</b>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td bgcolor="{{ config('darkborder') }}">
|
<td style="padding: 4px; background: {{ config('darkborder') }}">
|
||||||
Account of character: <input type="text" name="nick" value="{{ nick }}" size="40" readonly="readonly"><br/>
|
Account of character: <input type="text" name="nick" value="{{ nick }}" size="40" readonly="readonly"><br/>
|
||||||
New password: <input id="passor" type="password" name="passor" value="" size="40"><br/>
|
New password: <input id="passor" type="password" name="passor" value="" size="40"><br/>
|
||||||
Repeat new password: <input id="passor2" type="password" name="passor" value="" size="40"><br/>
|
Repeat new password: <input id="passor2" type="password" name="passor" value="" size="40"><br/>
|
||||||
New e-mail address: <input id="email" type="text" name="email" value="" size="40"><br/>
|
New e-mail address: <input id="email" type="text" name="email" value="" size="40"><br/>
|
||||||
<input type=hidden name="key" VALUE="{{ recKey }}">
|
<input type="hidden" name="key" VALUE="{{ recKey }}">
|
||||||
</td></tr>
|
</td>
|
||||||
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<br>
|
<br>
|
||||||
<table cellspacing="0" cellpadding="0" border="0" width="100%">
|
<table style="width: 100%">
|
||||||
<tr>
|
<tr>
|
||||||
<td align="center">
|
<td align="center">
|
||||||
{{ include('buttons.submit.html.twig') }}
|
{% set button_name = 'Submit' %}
|
||||||
|
{% include('buttons.base.html.twig') %}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
@@ -3,8 +3,8 @@ You asked to reset your {{ config('lua')['serverName'] }} password.<br/>
|
|||||||
<br/>
|
<br/>
|
||||||
To do so, please click this link:
|
To do so, please click this link:
|
||||||
<p>
|
<p>
|
||||||
<a href="{{ getLink('account/lost') }}?action=check-code&code={{ newCode }}&character={{ nick|urlencode }}">{{ getLink('account/lost') }}?action=check-code&code={{ newCode }}&character={{ nick|urlencode }}</a>
|
<a href="{{ getLink('account/lost/check-code') }}?code={{ newCode }}&character={{ nick|urlencode }}">{{ getLink('account/lost/check-code') }}?code={{ newCode }}&character={{ nick|urlencode }}</a>
|
||||||
</p>
|
</p>
|
||||||
<p>or open page: <i>{{ getLink('account/lost') }}?action=check-code</i> and in field "code" write <b>{{ newCode }}</b></p>
|
<p>or open page: <i>{{ getLink('account/lost/check-code') }}</i> and in field "code" write <b>{{ newCode }}</b></p>
|
||||||
<br/>
|
<br/>
|
||||||
<p>If you did not request a password change, you may ignore this message and your password will remain unchanged.
|
<p>If you did not request a password change, you may ignore this message and your password will remain unchanged.
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
<h3>Your account name and password!</h3>
|
<h3>Your account name and password!</h3>
|
||||||
<p>Changed password to your account in Lost Account Interface on server <a href="{{ constant('BASE_URL') }}"><b>config('lua')['serverName'] }}</b></a></p>
|
<p>Changed password to your account in Lost Account Interface on server <a href="{{ constant('BASE_URL') }}"><b>{{ config('lua')['serverName'] }}</b></a></p>
|
||||||
<p>Account name: <b>{{ account.getName() }}</b></p>
|
<p>Account name: <b>{{ account.getName() }}</b></p>
|
||||||
<p>New password: <b>{{ newPassword }}</b></p>
|
<p>New password: <b>{{ newPassword }}</b></p>
|
||||||
<br/>
|
<br/>
|
||||||
|
Reference in New Issue
Block a user