]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 349336: Automatically log in the user when he chooses his password to create...
authorlpsolit%gmail.com <>
Tue, 11 Aug 2009 07:25:43 +0000 (07:25 +0000)
committerlpsolit%gmail.com <>
Tue, 11 Aug 2009 07:25:43 +0000 (07:25 +0000)
template/en/default/global/messages.html.tmpl
token.cgi

index 15100ac6b6d61b6bda72d7ebc5920554f4027026..dd3967dc120e83819d1c999a0a2af67d1e51552a 100644 (file)
 
 [% 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 <a href="index.cgi">Log In</a> page to enter
-      this [% terms.Bugzilla %] installation.
-    [% END %]
 
   [% ELSIF message_tag == "account_creation_canceled" %]
     [% title = "User Account Creation Canceled" %]
index eaadee3e095c06c2345508e4518b83b1913de27b..1e62bb8a0a3e07538866f99c14ddd019cb66e9a2 100755 (executable)
--- 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());
 }