[aur-dev] [PATCH] Include user name in password reset emails

Lukas Fleischer lfleischer at archlinux.org
Fri May 22 20:35:24 UTC 2015


Fixes FS#44320.

Signed-off-by: Lukas Fleischer <lfleischer at archlinux.org>
---
 web/html/passreset.php | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/web/html/passreset.php b/web/html/passreset.php
index fca3d10..29f2c64 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');
-- 
2.4.1


More information about the aur-dev mailing list