mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
Include user name in password reset emails
Fixes FS#44320. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
This commit is contained in:
parent
dd3eb28a8c
commit
40461eb738
1 changed files with 6 additions and 4 deletions
|
@ -41,15 +41,17 @@ if (isset($_GET['resetkey'], $_POST['email'], $_POST['password'], $_POST['confir
|
||||||
}
|
}
|
||||||
} elseif (isset($_POST['email'])) {
|
} elseif (isset($_POST['email'])) {
|
||||||
$email = $_POST['email'];
|
$email = $_POST['email'];
|
||||||
|
$username = username_from_id(uid_from_email($email));
|
||||||
|
|
||||||
if (empty($email)) {
|
if (empty($email)) {
|
||||||
$error = __('Missing a required field.');
|
$error = __('Missing a required field.');
|
||||||
} else {
|
} else {
|
||||||
$subject = 'AUR Password Reset';
|
$subject = 'AUR Password Reset';
|
||||||
$body = __('A password reset request was submitted for the account '.
|
$body = __('A password reset request was submitted for the ' .
|
||||||
'associated with your e-mail address. If you wish to reset '.
|
'account %s associated with your e-mail address. ' .
|
||||||
'your password follow the link below, otherwise ignore '.
|
'If you wish to reset your password follow the ' .
|
||||||
'this message and nothing will happen.');
|
'link below, otherwise ignore this message and ' .
|
||||||
|
'nothing will happen.', $username);
|
||||||
send_resetkey($email, $subject, $body);
|
send_resetkey($email, $subject, $body);
|
||||||
|
|
||||||
header('Location: ' . get_uri('/passreset/') . '?step=confirm');
|
header('Location: ' . get_uri('/passreset/') . '?step=confirm');
|
||||||
|
|
Loading…
Add table
Reference in a new issue