summaryrefslogtreecommitdiffstats
path: root/createaccount.cgi
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2015-03-11 17:15:33 +0100
committerFrédéric Buclin <LpSolit@gmail.com>2015-03-11 17:15:33 +0100
commitcd00796d216adf82d18ed3b3a6bbcaa7b99b4619 (patch)
treeaa87f855d98bcd7c8fb2c8a38a6b7e73c41af307 /createaccount.cgi
parentc3b984aa204bdb318b05302ab50702b789c305b0 (diff)
downloadbugzilla-cd00796d216adf82d18ed3b3a6bbcaa7b99b4619.tar.gz
bugzilla-cd00796d216adf82d18ed3b3a6bbcaa7b99b4619.tar.xz
Bug 325315: The page to reset a forgotten password should be distinct from the login page
r=dkl a=glob
Diffstat (limited to 'createaccount.cgi')
-rwxr-xr-xcreateaccount.cgi19
1 files changed, 12 insertions, 7 deletions
diff --git a/createaccount.cgi b/createaccount.cgi
index a15396384..cd5309f05 100755
--- a/createaccount.cgi
+++ b/createaccount.cgi
@@ -27,10 +27,15 @@ my $vars = { doc_section => 'using/creating-an-account.html' };
print $cgi->header();
-$user->check_account_creation_enabled;
my $login = $cgi->param('login');
+my $request_new_password = $cgi->param('request_new_password');
-if (defined($login)) {
+if ($request_new_password) {
+ $template->process('account/request-new-password.html.tmpl', $vars)
+ || ThrowTemplateError($template->error());
+}
+elsif (defined($login)) {
+ $user->check_account_creation_enabled;
# Check the hash token to make sure this user actually submitted
# the create account form.
my $token = $cgi->param('token');
@@ -41,9 +46,9 @@ if (defined($login)) {
$template->process("account/created.html.tmpl", $vars)
|| ThrowTemplateError($template->error());
- exit;
}
-
-# Show the standard "would you like to create an account?" form.
-$template->process("account/create.html.tmpl", $vars)
- || ThrowTemplateError($template->error());
+else {
+ # Show the standard "would you like to create an account?" form.
+ $template->process('account/create.html.tmpl', $vars)
+ || ThrowTemplateError($template->error());
+}