summaryrefslogtreecommitdiffstats
path: root/web/html/passreset.php
diff options
context:
space:
mode:
authorLukas Fleischer <lfleischer@archlinux.org>2015-05-22 22:32:43 +0200
committerLukas Fleischer <lfleischer@archlinux.org>2015-05-22 22:32:43 +0200
commit40461eb7382d3db9433e73e7843120fc7c42ca06 (patch)
treefe397569457c87fdb0d121fed336a172796d1085 /web/html/passreset.php
parentdd3eb28a8cb35aeb8a069f3a20e5eb5fd348de62 (diff)
downloadaur-40461eb7382d3db9433e73e7843120fc7c42ca06.tar.gz
aur-40461eb7382d3db9433e73e7843120fc7c42ca06.tar.xz
Include user name in password reset emails
Fixes FS#44320. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
Diffstat (limited to 'web/html/passreset.php')
-rw-r--r--web/html/passreset.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/web/html/passreset.php b/web/html/passreset.php
index fca3d105..29f2c648 100644
--- a/web/html/passreset.php
+++ b/web/html/passreset.php
@@ -41,15 +41,17 @@ if (isset($_GET['resetkey'], $_POST['email'], $_POST['password'], $_POST['confir
}
} elseif (isset($_POST['email'])) {
$email = $_POST['email'];
+ $username = username_from_id(uid_from_email($email));
if (empty($email)) {
$error = __('Missing a required field.');
} else {
$subject = 'AUR Password Reset';
- $body = __('A password reset request was submitted for the account '.
- 'associated with your e-mail address. If you wish to reset '.
- 'your password follow the link below, otherwise ignore '.
- 'this message and nothing will happen.');
+ $body = __('A password reset request was submitted for the ' .
+ 'account %s associated with your e-mail address. ' .
+ 'If you wish to reset your password follow the ' .
+ 'link below, otherwise ignore this message and ' .
+ 'nothing will happen.', $username);
send_resetkey($email, $subject, $body);
header('Location: ' . get_uri('/passreset/') . '?step=confirm');