From 03467ea64eb08a69eba5f177c51871a33958606d Mon Sep 17 00:00:00 2001 From: slawkens Date: Sat, 6 Jun 2020 19:51:17 +0200 Subject: [PATCH] Update change_password email to be more informal --- system/pages/account/change_password.php | 4 +++- system/templates/mail.password_changed.html.twig | 10 +++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/system/pages/account/change_password.php b/system/pages/account/change_password.php index 37ff7f32..bd63c46d 100644 --- a/system/pages/account/change_password.php +++ b/system/pages/account/change_password.php @@ -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)) diff --git a/system/templates/mail.password_changed.html.twig b/system/templates/mail.password_changed.html.twig index 806a7edf..bf20bdde 100644 --- a/system/templates/mail.password_changed.html.twig +++ b/system/templates/mail.password_changed.html.twig @@ -1,3 +1,7 @@ -

Password to account changed!

-

You or someone else changed password to your account on server {{ config.lua.serverName }}.

-

New password: {{ new_password }}

' \ No newline at end of file +Hi there! This is a quick warning to let you know that your {{ config.lua.serverName }} password has been changed. +

+The request was made on {{ "now"|date("F j, Y, g:i a") }} by a user with the IP: {{ ip }}. +

+The new password is: {{ new_password }} +

+If this was you, please ignore this email. If it was not you, please contact our support department at admin@pastebin.com. \ No newline at end of file