Commit 73bb1759 authored by lpsolit%gmail.com's avatar lpsolit%gmail.com

Bug 349336: Automatically log in the user when he chooses his password to create…

Bug 349336: Automatically log in the user when he chooses his password to create his new account - Patch by Fré©ric Buclin <LpSolit@gmail.com> r/a=mkanat
parent 414d5554
...@@ -31,16 +31,11 @@ ...@@ -31,16 +31,11 @@
[% message = BLOCK %] [% message = BLOCK %]
[% IF message_tag == "account_created" %] [% IF message_tag == "account_created" %]
[% title = "User $otheruser.login created" %] The user account [% otheruser.login FILTER html %] has been created
A new user account [% otheruser.login FILTER html %] has been created
successfully. successfully.
[% IF groups.size %] [% IF groups.size %]
You may want to edit the group settings now, using the form below. You may want to edit the group settings now, using the form below.
[% END %] [% END %]
[% IF login_info %]
You can now go to the <a href="index.cgi">Log In</a> page to enter
this [% terms.Bugzilla %] installation.
[% END %]
[% ELSIF message_tag == "account_creation_canceled" %] [% ELSIF message_tag == "account_creation_canceled" %]
[% title = "User Account Creation Canceled" %] [% title = "User Account Creation Canceled" %]
......
...@@ -390,11 +390,15 @@ sub confirm_create_account { ...@@ -390,11 +390,15 @@ sub confirm_create_account {
# Let the user know that his user account has been successfully created. # Let the user know that his user account has been successfully created.
$vars->{'message'} = 'account_created'; $vars->{'message'} = 'account_created';
$vars->{'otheruser'} = $otheruser; $vars->{'otheruser'} = $otheruser;
$vars->{'login_info'} = 1;
# Log in the new user using credentials he just gave.
$cgi->param('Bugzilla_login', $otheruser->login);
$cgi->param('Bugzilla_password', $password);
Bugzilla->login(LOGIN_OPTIONAL);
print $cgi->header(); print $cgi->header();
$template->process('global/message.html.tmpl', $vars) $template->process('index.html.tmpl', $vars)
|| ThrowTemplateError($template->error()); || ThrowTemplateError($template->error());
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment