diff --git a/system/pages/account/lost.php b/system/pages/account/lost.php index 79c739cb..42e23d38 100644 --- a/system/pages/account/lost.php +++ b/system/pages/account/lost.php @@ -17,532 +17,31 @@ if(!setting('core.mail_enabled')) return; } -$action_type = isset($_REQUEST['action_type']) ? $_REQUEST['action_type'] : ''; -if($action == '') -{ +$action_type = $_REQUEST['action_type'] ?? ''; +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') -{ - $nick = stripslashes($_REQUEST['nick']); - if(Validator::characterName($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()) - echo 'Please enter e-mail to account with this character.
-
- - - - -
Please enter e-mail to account
- Character:
- E-mail to account:
-
-
-
- ' . $twig->render('buttons.submit.html.twig') . '
-
'; - 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 ('.$nick.') 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 ' . $nick . ' doesn\'t exist.'; - } - else - echo 'Invalid player name format. If you have other characters on account try with other name.'; - echo '
- Back
-
'; +elseif($action == 'step1' && $action_type == 'email') { + require PAGES . 'account/lost/step1-email.php'; } -elseif($action == 'sendcode') -{ - $email = $_REQUEST['email']; - $nick = stripslashes($_REQUEST['nick']); - if(Validator::characterName($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()) - { - if($account->getEMail() == $email) - { - $newcode = generateRandomString(30, true, false, true); - $mailBody = ' - You asked to reset your ' . $config['lua']['serverName'] . ' password.
-

Account name: '.$account->getName().'

-
- To do so, please click this link: -

' . getLink('account/lost') . '?action=checkcode&code='.$newcode.'&character='.urlencode($nick).'

-

or open page: ' . getLink('account/lost') . '?action=checkcode and in field "code" write '.$newcode.'

-
-

If you did not request a password change, you may ignore this message and your password will remain unchanged.'; - - $account_mail = $account->getCustomField('email'); - if(_mail($account_mail, $config['lua']['serverName'].' - Recover your account', $mailBody)) - { - $account->setCustomField('email_code', $newcode); - $account->setCustomField('email_next', (time() + setting('core.mail_lost_account_interval'))); - echo '
Details about steps required to recover your account has been sent to ' . $account_mail . '. You should receive this email within 15 minutes. Please check your inbox/spam directory.'; - } - else - { - $account->setCustomField('email_next', (time() + 60)); - echo '

An error occurred while sending email! Try again later or contact with admin. For Admin: More info can be found in system/logs/mailer-error.log

'; - } - } - else - echo 'Invalid e-mail to account of character '.$nick.'. Try again.'; - } - 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 ('.$nick.') 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 '.$nick.' doesn\'t exist.'; - } - else - echo 'Invalid player name format. If you have other characters on account try with other name.'; - echo '
- Back
-
'; +elseif($action == 'send-code') { + require PAGES . 'account/lost/send-code.php'; } -elseif($action == 'step1' && $action_type == 'reckey') -{ - $nick = stripslashes($_REQUEST['nick']); - if(Validator::characterName($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.
-
- - - -
Please enter your recovery key
- Character name: 
- Recovery key:    
-
-
-
- ' . $twig->render('buttons.submit.html.twig') . '
-
'; - } - else - echo 'Account of this character has no recovery key!'; - } - else - echo 'Player or account of player '.$nick.' doesn\'t exist.'; - } - else - echo 'Invalid player name format. If you have other characters on account try with other name.'; - echo '
- Back
-
'; +elseif($action == 'step1' && $action_type == 'reckey') { + require PAGES . 'account/lost/step1-reckey.php'; } -elseif($action == 'step2') -{ - $rec_key = trim($_REQUEST['key']); - $nick = stripslashes($_REQUEST['nick']); - if(Validator::characterName($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)) - { - if($account_key == $rec_key) - { - echo ''; - echo 'Set new password and e-mail to your account.
-
- - - - -
Please enter new password and e-mail
- Account of character:  
- New password:            
- Repeat new password:  
- New e-mail address:     
- -
-
-
- ' . $twig->render('buttons.submit.html.twig') . '
-
'; - } - else - echo 'Wrong recovery key!'; - } - else - echo 'Account of this character has no recovery key!'; - } - else - echo 'Player or account of player '.$nick.' doesn\'t exist.'; - } - else - echo 'Invalid player name format. If you have other characters on account try with other name.'; - echo '
- Back
-
'; +elseif($action == 'step2') { + require PAGES . 'account/lost/step2.php'; } -elseif($action == 'step3') -{ - $rec_key = trim($_REQUEST['key']); - $nick = stripslashes($_REQUEST['nick']); - $new_pass = trim($_REQUEST['passor']); - $new_email = trim($_REQUEST['email']); - if(Validator::characterName($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)) - { - if($account_key == $rec_key) - { - if(Validator::password($new_pass)) - { - if(Validator::email($new_email)) - { - $account->setEMail($new_email); - - $tmp_new_pass = $new_pass; - if(USE_ACCOUNT_SALT) - { - $salt = generateRandomString(10, false, true, true); - $tmp_new_pass = $salt . $new_pass; - } - - $account->setPassword(encrypt($tmp_new_pass)); - $account->save(); - - if(USE_ACCOUNT_SALT) - $account->setCustomField('salt', $salt); - - echo 'Your account name, new password and new e-mail.
-
- - - -
Your account name, new password and new e-mail
- Account name:     '.$account->getName().'
- New password:        '.$new_pass.'
- New e-mail address: '.$new_email.'
'; - if($account->getCustomField('email_next') < time()) - { - $mailBody = ' -

Your account name and new password!

-

Changed password and e-mail to your account in Lost Account Interface on server '.$config['lua']['serverName'].'

-

Account name: '.$account->getName().'

-

New password: '.$new_pass.'

-

E-mail: '.$new_email.' (this e-mail)

-
-

It\'s automatic e-mail from OTS Lost Account System. Do not reply!

'; - - if(_mail($account->getCustomField('email'), $config['lua']['serverName']." - New password to your account", $mailBody)) - { - echo '
Sent e-mail with your account name and password to new e-mail. You should receive this e-mail in 15 minutes. You can login now with new password!'; - } - else - { - echo '

An error occurred while sending email! You will not receive e-mail with this informations. For Admin: More info can be found in system/logs/mailer-error.log

'; - } - } - else - { - echo '
You will not receive e-mail with this informations.'; - } - echo ' - -

-
-
-
'; - } - else - echo Validator::getLastError(); - } - else - echo Validator::getLastError(); - } - else - echo 'Wrong recovery key!'; - } - else - echo 'Account of this character has no recovery key!'; - } - else - echo 'Player or account of player '.$nick.' doesn\'t exist.'; - } - else - echo 'Invalid player name format. If you have other characters on account try with other name.'; - echo '
- Back
-
'; +elseif($action == 'step3') { + require PAGES . 'account/lost/step3.php'; } -elseif($action == 'checkcode') -{ - $code = trim($_REQUEST['code']); - $character = stripslashes(trim($_REQUEST['character'])); - if(empty($code) || empty($character)) - echo 'Please enter code from e-mail and name of one character from account. Then press Submit.
-
- - - -
Code & character name
- Your code: 
- Character: 
-
-
-
- ' . $twig->render('buttons.submit.html.twig') . '
-
'; - else - { - $player = new OTS_Player(); - $account = new OTS_Account(); - $player->find($character); - if($player->isLoaded()) - $account = $player->getAccount(); - if($account->isLoaded()) - { - if($account->getCustomField('email_code') == $code) - { - echo ' - Please enter new password to your account and repeat to make sure you remember password.
-
- - - - - -
Code & account name
- New password:      
- Repeat new password: 
-
-
-
- ' . $twig->render('buttons.submit.html.twig') . '
-
'; - } - else - $error= 'Wrong code to change password.'; - } - else - $error = 'Account of this character or this character doesn\'t exist.'; - } - if(!empty($error)) - echo ''.$error.'
Please enter code from e-mail and name of one character from account. Then press Submit.
-
- - - -
Code & character name
- Your code: 
- Character: 
-
-
-
- ' . $twig->render('buttons.submit.html.twig') . '
-
'; +elseif($action == 'check-code') { + require PAGES . 'account/lost/check-code.php'; } -elseif($action == 'setnewpassword') -{ - $newpassword = $_REQUEST['passor']; - $code = $_REQUEST['code']; - $character = stripslashes($_REQUEST['character']); - echo ''; - if(empty($code) || empty($character) || empty($newpassword)) - echo 'Error. Try again.
Please enter code from e-mail and name of one character from account. Then press Submit.
-
-
-
-
'; - else - { - $player = new OTS_Player(); - $account = new OTS_Account(); - $player->find($character); - if($player->isLoaded()) - $account = $player->getAccount(); - if($account->isLoaded()) - { - if($account->getCustomField('email_code') == $code) - { - if(Validator::password($newpassword)) - { - $tmp_new_pass = $newpassword; - if(USE_ACCOUNT_SALT) - { - $salt = generateRandomString(10, false, true, true); - $tmp_new_pass = $salt . $newpassword; - $account->setCustomField('salt', $salt); - } - - $account->setPassword(encrypt($tmp_new_pass )); - $account->save(); - $account->setCustomField('email_code', ''); - echo 'New password to your account is below. Now you can login.
- - - - -
Changed password
- New password: '.$newpassword.'
- Account name:   (Already on your e-mail)
'; - - $mailBody = ' -

Your account name and password!

-

Changed password to your account in Lost Account Interface on server '.$config['lua']['serverName'].'

-

Account name: '.$account->getName().'

-

New password: '.$newpassword.'

-
-

It\'s automatic e-mail from OTS Lost Account System. Do not reply!

'; - - if(_mail($account->getCustomField('email'), $config['lua']['serverName']." - Your new password", $mailBody)) - { - echo '
New password work! Sent e-mail with your password and account name. You should receive this e-mail in 15 minutes. You can login now with new password!'; - } - else - { - echo '

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'; - } - echo '

-
-
-
-
-
'; - } - else - $error= Validator::getLastError(); - } - else - $error= 'Wrong code to change password.'; - } - else - $error = 'Account of this character or this character doesn\'t exist.'; - } - if(!empty($error)) - echo ''.$error.'
Please enter code from e-mail and name of one character from account. Then press Submit.
-
- - - -
Code & character name
- Your code: 
- Character: 
-
-
-
- ' . $twig->render('buttons.submit.html.twig') . '
-
'; +elseif($action == 'set-new-password') { + require PAGES . 'account/lost/set-new-password.php'; } diff --git a/system/pages/account/lost/check-code.php b/system/pages/account/lost/check-code.php new file mode 100644 index 00000000..42c1ae1c --- /dev/null +++ b/system/pages/account/lost/check-code.php @@ -0,0 +1,57 @@ +display('account.lost.check-code.html.twig', [ + 'code' => $code, + 'characters' => $character, + ]); +else +{ + $player = new OTS_Player(); + $account = new OTS_Account(); + $player->find($character); + if($player->isLoaded()) { + $account = $player->getAccount(); + } + + if($account->isLoaded()) { + if($account->getCustomField('email_code') == $code) { + echo ' + Please enter new password to your account and repeat to make sure you remember password.
+
+ + + + + +
Passwords
+ New password:      
+ Repeat new password: 
+
+
+
+ ' . $twig->render('buttons.submit.html.twig') . '
+
'; + } + else { + $error = 'Wrong code to change password.'; + } + } + else { + $error = "Account of this character or this character doesn't exist."; + } +} + +if(!empty($error)) { + $twig->display('error_box.html.twig', [ + 'errors' => [$error], + ]); + + echo '
'; + + $twig->display('account.lost.check-code.html.twig', [ + + ]); +} diff --git a/system/pages/account/lost/send-code.php b/system/pages/account/lost/send-code.php new file mode 100644 index 00000000..b7d51298 --- /dev/null +++ b/system/pages/account/lost/send-code.php @@ -0,0 +1,56 @@ +find($nick); +if($player->isLoaded()) { + $account = $player->getAccount(); +} + +if($account->isLoaded()) { + if($account->getCustomField('email_next') < time()) { + if($account->getEMail() == $email) { + $newCode = generateRandomString(30, true, false, true); + $mailBody = $twig->render('mail.account.lost.code.html.twig', [ + 'newCode' => $newCode, + 'account' => $account, + 'nick' => $nick, + ]); + + $accountEMail = $account->getCustomField('email'); + if(_mail($accountEMail, configLua('serverName') . ' - Recover your account', $mailBody)) { + $account->setCustomField('email_code', $newCode); + $account->setCustomField('email_next', (time() + setting('core.mail_lost_account_interval'))); + + echo '
Details about steps required to recover your account has been sent to ' . $accountEMail . '. You should receive this email within 15 minutes. Please check your inbox/spam directory.'; + } + else { + $account->setCustomField('email_next', (time() + 60)); + error('An error occurred while sending email! Try again later or contact with admin. For Admin: More info can be found in system/logs/mailer-error.log

'); + } + } + else { + echo 'Invalid e-mail to account of character ' . htmlspecialchars($nick) . '. Try again.'; + } + } + 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 (' . htmlspecialchars($nick) . ') 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 " . htmlspecialchars($nick) . " doesn't exist."; +} + +$twig->display('account.back_button.html.twig', [ + 'new_line' => true, + 'center' => true, + 'action' => getLink('account/lost') . '?action=step1&action_type=email&nick=' . urlencode($nick), +]); diff --git a/system/pages/account/lost/set-new-password.php b/system/pages/account/lost/set-new-password.php new file mode 100644 index 00000000..2fabe078 --- /dev/null +++ b/system/pages/account/lost/set-new-password.php @@ -0,0 +1,81 @@ +Error. Try again.
Please enter code from e-mail and name of one character from account. Then press Submit.
'; + + $twig->display('account.back_button.html.twig', [ + 'new_line' => true, + 'center' => true, + 'action' => getLink('account/lost') . '?action=check-code', + ]); +} +else +{ + $player = new OTS_Player(); + $account = new OTS_Account(); + $player->find($character); + if($player->isLoaded()) { + $account = $player->getAccount(); + } + + if($account->isLoaded()) + { + if($account->getCustomField('email_code') == $code) + { + if(Validator::password($newPassword)) + { + $tmp_new_pass = $newPassword; + if(USE_ACCOUNT_SALT) + { + $salt = generateRandomString(10, false, true, true); + $tmp_new_pass = $salt . $newPassword; + $account->setCustomField('salt', $salt); + } + + $account->setPassword(encrypt($tmp_new_pass)); + $account->save(); + $account->setCustomField('email_code', ''); + + $mailBody = $twig->render('mail.account.lost.new-password.html.twig', [ + 'account' => $account, + 'newPassword' => $newPassword, + ]); + + $statusMsg = ''; + if(_mail($account->getCustomField('email'), configLua('serverName') . ' - Your new password', $mailBody)) { + $statusMsg = '
New password work! Sent e-mail with your password and account name. You should receive this e-mail in 15 minutes. You can login now with new password!'; + } + else { + $statusMsg = '

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', [ + 'statusMsg' => $statusMsg, + 'newPassword' => $newPassword, + ]); + } + else + $error= Validator::getLastError(); + } + else + $error= 'Wrong code to change password.'; + } + else + $error = 'Account of this character or this character doesn\'t exist.'; +} + +if(!empty($error)) { + $twig->display('error_box.html.twig', [ + 'errors' => [$error], + ]); + + echo '
'; + + $twig->display('account.lost.check-code.html.twig', [ + 'code' => $code, + 'character' => $character, + ]); +} diff --git a/system/pages/account/lost/step1-email.php b/system/pages/account/lost/step1-email.php new file mode 100644 index 00000000..596b6b52 --- /dev/null +++ b/system/pages/account/lost/step1-email.php @@ -0,0 +1,36 @@ +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 ('.$nick.') 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 " . htmlspecialchars($nick) . " doesn't exist."; +} + +$twig->display('account.back_button.html.twig', [ + 'new_line' => true, + 'center' => true, + 'action' => getLink('account/lost'), +]); diff --git a/system/pages/account/lost/step1-reckey.php b/system/pages/account/lost/step1-reckey.php new file mode 100644 index 00000000..66a78e5c --- /dev/null +++ b/system/pages/account/lost/step1-reckey.php @@ -0,0 +1,39 @@ +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.
+

+ + + +
Please enter your recovery key
+ Character name: 
+ Recovery key:    
+
+
+
+ ' . $twig->render('buttons.submit.html.twig') . '
+
'; + } + else + echo 'Account of this character has no recovery key!'; +} +else { + echo 'Player or account of player ' . htmlspecialchars($nick) . ' doesn\'t exist.'; +} + +$twig->display('account.back_button.html.twig', [ + 'new_line' => true, + 'center' => true, + 'action' => getLink('account/lost'), +]); diff --git a/system/pages/account/lost/step2.php b/system/pages/account/lost/step2.php new file mode 100644 index 00000000..d9533031 --- /dev/null +++ b/system/pages/account/lost/step2.php @@ -0,0 +1,37 @@ +find($nick); +if($player->isLoaded()) { + $account = $player->getAccount(); +} + +if($account->isLoaded()) { + $accountKey = $account->getCustomField('key'); + if(!empty($accountKey)) { + if($accountKey == $recKey) { + $twig->display('account.lost.step2.html.twig', [ + 'nick' => $nick, + 'recKey' => $recKey, + ]); + } + else { + echo 'Wrong recovery key!'; + } + } + else { + echo 'Account of this character has no recovery key!'; + } +} +else + echo "Player or account of player " . htmlspecialchars($nick) . " doesn't exist."; + +$twig->display('account.back_button.html.twig', [ + 'new_line' => true, + 'center' => true, + 'action' => getLink('account/lost') . '?action=step1&action_type=reckey&nick=' . urlencode($nick), +]); diff --git a/system/pages/account/lost/step3.php b/system/pages/account/lost/step3.php new file mode 100644 index 00000000..44a69cec --- /dev/null +++ b/system/pages/account/lost/step3.php @@ -0,0 +1,87 @@ +find($nick); +if($player->isLoaded()) { + $account = $player->getAccount(); +} + +if($account->isLoaded()) +{ + $accountKey = $account->getCustomField('key'); + if(!empty($accountKey)) { + if($accountKey == $recKey) { + if(Validator::password($newPassword)) { + if(Validator::email($newEmail)) { + $account->setEMail($newEmail); + + $tmp_new_pass = $newPassword; + if(USE_ACCOUNT_SALT) + { + $salt = generateRandomString(10, false, true, true); + $tmp_new_pass = $salt . $newPassword; + } + + $account->setPassword(encrypt($tmp_new_pass)); + $account->save(); + + if(USE_ACCOUNT_SALT) { + $account->setCustomField('salt', $salt); + } + + $statusMsg = ''; + if($account->getCustomField('email_next') < time()) { + $mailBody = $twig->render('mail.account.lost.new-email.html.twig', [ + 'account' => $account, + 'newPassword' => $newPassword, + 'newEmail' => $newEmail, + ]); + + if(_mail($account->getCustomField('email'), $config['lua']['serverName']." - New password to your account", $mailBody)) { + $statusMsg = '
Sent e-mail with your account name and password to new e-mail. You should receive this e-mail in 15 minutes. You can login now with new password!'; + } + else { + $statusMsg = '

An error occurred while sending email! You will not receive e-mail with this informations. For Admin: More info can be found in system/logs/mailer-error.log

'; + } + } + else { + $statusMsg = '
You will not receive e-mail with this informations.'; + } + + $twig->display('account.lost.finish.new-email.html.twig', [ + 'statusMsg' => $statusMsg, + 'account' => $account, + 'newPassword' => $newPassword, + 'newEmail' => $newEmail, + ]); + } + else { + echo Validator::getLastError(); + } + } + else { + echo Validator::getLastError(); + } + } + else { + echo 'Wrong recovery key!'; + } + } + else { + echo 'Account of this character has no recovery key!'; + } +} +else { + echo "Player or account of player " . htmlspecialchars($nick) . " doesn't exist."; +} + +$twig->display('account.back_button.html.twig', [ + 'new_line' => true, + 'center' => true, + 'action' => getLink('account/lost') . '?action=step1&action_type=reckey&nick=' . urlencode($nick), +]); diff --git a/system/templates/account.back_button.html.twig b/system/templates/account.back_button.html.twig index e2d784ca..90d92aa3 100644 --- a/system/templates/account.back_button.html.twig +++ b/system/templates/account.back_button.html.twig @@ -1,7 +1,26 @@ {% if new_line is defined and new_line %}
{% endif %} -
- {{ csrf() }} - {{ include('buttons.back.html.twig') }} -
+ +{% set _center = false %} + +{% if center is defined and center %} +{% set _center = true %} +{% endif %} + +{% if _center %} + + + + + + +
+{% endif %} +
+ {{ csrf() }} + {{ include('buttons.back.html.twig') }} +
+{% if _center %} +
+{% endif %} diff --git a/system/templates/account.lost.check-code.html.twig b/system/templates/account.lost.check-code.html.twig new file mode 100644 index 00000000..1ee60406 --- /dev/null +++ b/system/templates/account.lost.check-code.html.twig @@ -0,0 +1,24 @@ +Please enter code from e-mail and name of one character from account. Then press Submit.
+
+ + + + + + + +
+ Code & character name +
+ Your code: 
+ Character: 
+
+
+ + + + +
+ {{ include('buttons.submit.html.twig') }} +
+
diff --git a/system/templates/account.lost.finish.new-email.html.twig b/system/templates/account.lost.finish.new-email.html.twig new file mode 100644 index 00000000..4fd6d3d6 --- /dev/null +++ b/system/templates/account.lost.finish.new-email.html.twig @@ -0,0 +1,26 @@ +Your account name, new password and new e-mail.
+ + + + + + + +
+ Your account name, new password and new e-mail +
+ Account name:     {{ account.getName() }}
+ New password:        {{ newPassword }}
+ New e-mail address: {{ newEmail }}
+ {{ statusMsg|raw }} +
+
+ + + + +
+
+ {{ include('buttons.login.html.twig') }} +
+
diff --git a/system/templates/account.lost.finish.new-password.html.twig b/system/templates/account.lost.finish.new-password.html.twig new file mode 100644 index 00000000..72af2fe5 --- /dev/null +++ b/system/templates/account.lost.finish.new-password.html.twig @@ -0,0 +1,23 @@ +New password to your account is below. Now you can login.
+ + + + + + + +
Changed password
+ New password: {{ newPassword }}
+ Account name:   (Already on your e-mail)
+ {{ statusMsg|raw }} +
+
+ + + + +
+
+ {{ include('buttons.submit.html.twig') }} +
+
diff --git a/system/templates/account.lost.step1-email.html.twig b/system/templates/account.lost.step1-email.html.twig new file mode 100644 index 00000000..c51510df --- /dev/null +++ b/system/templates/account.lost.step1-email.html.twig @@ -0,0 +1,23 @@ +Please enter e-mail to account with this character.
+
+ + + + + + + + +
Please enter e-mail to account
+ Character:
+ E-mail to account:
+
+
+ + + + +
+ {{ include('buttons.submit.html.twig') }}
+
+
diff --git a/system/templates/account.lost.step2.html.twig b/system/templates/account.lost.step2.html.twig new file mode 100644 index 00000000..2849fae2 --- /dev/null +++ b/system/templates/account.lost.step2.html.twig @@ -0,0 +1,27 @@ +Set new password and e-mail to your account.
+
+ + + + + + + +
+ Please enter new password and e-mail +
+ Account of character:  
+ New password:            
+ Repeat new password:  
+ New e-mail address:     
+ +
+
+ + + + +
+ {{ include('buttons.submit.html.twig') }} +
+
diff --git a/system/templates/mail.account.lost.code.html.twig b/system/templates/mail.account.lost.code.html.twig new file mode 100644 index 00000000..cf0f1fd3 --- /dev/null +++ b/system/templates/mail.account.lost.code.html.twig @@ -0,0 +1,10 @@ +You asked to reset your {{ config('lua')['serverName'] }} password.
+

Account name: {{ account.getName() }}

+
+To do so, please click this link: +

+ {{ getLink('account/lost') }}?action=check-code&code={{ newCode }}&character={{ nick|urlencode }} +

+

or open page: {{ getLink('account/lost') }}?action=check-code and in field "code" write {{ newCode }}

+
+

If you did not request a password change, you may ignore this message and your password will remain unchanged. diff --git a/system/templates/mail.account.lost.new-email.html.twig b/system/templates/mail.account.lost.new-email.html.twig new file mode 100644 index 00000000..af22cc79 --- /dev/null +++ b/system/templates/mail.account.lost.new-email.html.twig @@ -0,0 +1,7 @@ +

Your account name and new password!

+

Changed password and e-mail to your account in Lost Account Interface on server {{ config('lua')['serverName'] }}

+

Account name: {{ account.getName() }}

+

New password: {{ newPassword }}

+

E-mail: {{ $newEmail }} (this e-mail)

+
+

It's automatic e-mail from OTS Lost Account System. Do not reply!

diff --git a/system/templates/mail.account.lost.new-password.html.twig b/system/templates/mail.account.lost.new-password.html.twig new file mode 100644 index 00000000..17eca26d --- /dev/null +++ b/system/templates/mail.account.lost.new-password.html.twig @@ -0,0 +1,6 @@ +

Your account name and password!

+

Changed password to your account in Lost Account Interface on server config('lua')['serverName'] }}

+

Account name: {{ account.getName() }}

+

New password: {{ newPassword }}

+
+

It's automatic e-mail from OTS Lost Account System. Do not reply!