mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
passreset.php: Error out if e-mail is empty
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
parent
48b74071f0
commit
cc490ce8d6
1 changed files with 12 additions and 7 deletions
|
@ -37,14 +37,19 @@ if (isset($_GET['resetkey'], $_POST['email'], $_POST['password'], $_POST['confir
|
|||
}
|
||||
} elseif (isset($_POST['email'])) {
|
||||
$email = $_POST['email'];
|
||||
$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.').
|
||||
send_resetkey($email, $body);
|
||||
|
||||
header('Location: ' . get_uri('/passreset/') . '?step=confirm');
|
||||
exit();
|
||||
if (empty($email)) {
|
||||
$error = __('Missing a required field.');
|
||||
} else {
|
||||
$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.').
|
||||
send_resetkey($email, $body);
|
||||
|
||||
header('Location: ' . get_uri('/passreset/') . '?step=confirm');
|
||||
exit();
|
||||
}
|
||||
}
|
||||
|
||||
$step = isset($_GET['step']) ? $_GET['step'] : NULL;
|
||||
|
|
Loading…
Add table
Reference in a new issue