createaccount.cgi: code style, remove CGI usage
parent
4780d5e94b
commit
f7e5e19970
|
@ -1,6 +1,4 @@
|
||||||
#!/usr/bin/perl -wT
|
#!/usr/bin/perl -wT
|
||||||
# -*- Mode: perl; indent-tabs-mode: nil -*-
|
|
||||||
#
|
|
||||||
# The contents of this file are subject to the Mozilla Public
|
# The contents of this file are subject to the Mozilla Public
|
||||||
# License Version 1.1 (the "License"); you may not use this file
|
# License Version 1.1 (the "License"); you may not use this file
|
||||||
# except in compliance with the License. You may obtain a copy of
|
# except in compliance with the License. You may obtain a copy of
|
||||||
|
@ -36,22 +34,24 @@ use Bugzilla::Error;
|
||||||
# on an error message. The user is logged out just after the account is
|
# on an error message. The user is logged out just after the account is
|
||||||
# actually created.
|
# actually created.
|
||||||
my $user = Bugzilla->login(LOGIN_OPTIONAL);
|
my $user = Bugzilla->login(LOGIN_OPTIONAL);
|
||||||
my $cgi = Bugzilla->cgi;
|
my $ARGS = Bugzilla->input_params;
|
||||||
my $template = Bugzilla->template;
|
my $template = Bugzilla->template;
|
||||||
my $vars = { doc_section => 'myaccount.html' };
|
my $vars = { doc_section => 'myaccount.html' };
|
||||||
|
|
||||||
$user->check_account_creation_enabled;
|
$user->check_account_creation_enabled;
|
||||||
my $login = $cgi->param('login');
|
my $login = $ARGS->{login};
|
||||||
|
|
||||||
if (defined($login)) {
|
if (defined $login)
|
||||||
|
{
|
||||||
$user->check_and_send_account_creation_confirmation($login);
|
$user->check_and_send_account_creation_confirmation($login);
|
||||||
$vars->{'login'} = $login;
|
$vars->{login} = $login;
|
||||||
|
|
||||||
$template->process("account/created.html.tmpl", $vars)
|
$template->process("account/created.html.tmpl", $vars)
|
||||||
|| ThrowTemplateError($template->error());
|
|| ThrowTemplateError($template->error());
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Show the standard "would you like to create an account?" form.
|
# Show the standard "would you like to create an account?" form.
|
||||||
$template->process("account/create.html.tmpl", $vars)
|
$template->process("account/create.html.tmpl", $vars)
|
||||||
|| ThrowTemplateError($template->error());
|
|| ThrowTemplateError($template->error());
|
||||||
|
exit;
|
||||||
|
|
Loading…
Reference in New Issue