From: lpsolit%gmail.com <> Date: Tue, 11 Aug 2009 07:25:43 +0000 (+0000) Subject: Bug 349336: Automatically log in the user when he chooses his password to create... X-Git-Tag: bugzilla-3.5.1~114 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=73bb17590cf3f15166d20b028977d0c61a487b1e;p=thirdparty%2Fbugzilla.git Bug 349336: Automatically log in the user when he chooses his password to create his new account - Patch by Frédéric Buclin r/a=mkanat --- diff --git a/template/en/default/global/messages.html.tmpl b/template/en/default/global/messages.html.tmpl index 15100ac6b6..dd3967dc12 100644 --- a/template/en/default/global/messages.html.tmpl +++ b/template/en/default/global/messages.html.tmpl @@ -31,16 +31,11 @@ [% message = BLOCK %] [% IF message_tag == "account_created" %] - [% title = "User $otheruser.login created" %] - A new user account [% otheruser.login FILTER html %] has been created + The user account [% otheruser.login FILTER html %] has been created successfully. [% IF groups.size %] You may want to edit the group settings now, using the form below. [% END %] - [% IF login_info %] - You can now go to the Log In page to enter - this [% terms.Bugzilla %] installation. - [% END %] [% ELSIF message_tag == "account_creation_canceled" %] [% title = "User Account Creation Canceled" %] diff --git a/token.cgi b/token.cgi index eaadee3e09..1e62bb8a0a 100755 --- a/token.cgi +++ b/token.cgi @@ -390,11 +390,15 @@ sub confirm_create_account { # Let the user know that his user account has been successfully created. $vars->{'message'} = 'account_created'; $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(); - $template->process('global/message.html.tmpl', $vars) + $template->process('index.html.tmpl', $vars) || ThrowTemplateError($template->error()); }