Update change_password email to be more informal

This commit is contained in:
slawkens 2020-06-06 19:51:17 +02:00
parent 3368fbd058
commit 03467ea64e
2 changed files with 10 additions and 4 deletions

View File

@ -31,6 +31,7 @@ else
$errors[] = Validator::getLastError();
}
/** @var OTS_Account $account_logged */
$old_password = encrypt(($config_salt_enabled ? $account_logged->getCustomField('salt') : '') . $old_password);
if($old_password != $account_logged->getPassword()) {
$errors[] = "Current password is incorrect!";
@ -63,7 +64,8 @@ else
if($config['mail_enabled'] && $config['send_mail_when_change_password'])
{
$mailBody = $twig->render('mail.password_changed.html.twig', array(
'new_password' => $org_pass
'new_password' => $org_pass,
'ip' => get_browser_real_ip(),
));
if(_mail($account_logged->getEMail(), $config['lua']['serverName']." - Changed password", $mailBody))

View File

@ -1,3 +1,7 @@
<h3>Password to account changed!</h3>
<p>You or someone else changed password to your account on server <a href="{{ constant('BASE_URL') }}"><b>{{ config.lua.serverName }}</b></a>.</p>
<p>New password: <b>{{ new_password }}</b></p>'
Hi there! This is a quick warning to let you know that your {{ config.lua.serverName }} password has been changed.
<br/><br/>
The request was made on {{ "now"|date("F j, Y, g:i a") }} by a user with the IP: {{ ip }}.
<br/><br/>
The new password is: <b>{{ new_password }}</b>
<br/><br/>
If this was you, please ignore this email. If it was not you, please contact our support department at admin@pastebin.com.