diff options
author | lpsolit%gmail.com <> | 2005-12-21 07:16:07 +0100 |
---|---|---|
committer | lpsolit%gmail.com <> | 2005-12-21 07:16:07 +0100 |
commit | 77788555fd12b38f7db7022f84ed4f5eb17f5301 (patch) | |
tree | baa3573feb5ffc4ee14dead2b5d513901f9ccc3d | |
parent | be43d4b573f7cebb627e88b46212c0903acf7c7b (diff) | |
download | bugzilla-77788555fd12b38f7db7022f84ed4f5eb17f5301.tar.gz bugzilla-77788555fd12b38f7db7022f84ed4f5eb17f5301.tar.xz |
Bug 320436: New self-created accounts dont get regexp group memberships - Patch by Joel Peshkin <bugreport@peshkin.net> r=LpSolit a=justdave
-rw-r--r-- | Bugzilla/User.pm | 4 | ||||
-rwxr-xr-x | createaccount.cgi | 4 | ||||
-rwxr-xr-x | editusers.cgi | 4 |
3 files changed, 9 insertions, 3 deletions
diff --git a/Bugzilla/User.pm b/Bugzilla/User.pm index fe46dc292..542e6e8d7 100644 --- a/Bugzilla/User.pm +++ b/Bugzilla/User.pm @@ -1349,6 +1349,10 @@ sub insert_new_user { "(user_id, relationship, event) " . "VALUES ($userid, " . REL_ANY . ", $event)"); } + + my $user = new Bugzilla::User($userid); + $user->derive_regexp_groups(); + # Return the password to the calling code so it can be included # in an email sent to the user. diff --git a/createaccount.cgi b/createaccount.cgi index 8bb7829ef..01b746c89 100755 --- a/createaccount.cgi +++ b/createaccount.cgi @@ -69,7 +69,9 @@ if (defined($login)) { $vars->{'login'} = $login; - $dbh->bz_lock_tables('profiles WRITE', 'email_setting WRITE', 'tokens READ'); + $dbh->bz_lock_tables('profiles WRITE', 'groups READ', + 'user_group_map WRITE', 'email_setting WRITE', + 'tokens READ'); if (!is_available_username($login)) { # Account already exists diff --git a/editusers.cgi b/editusers.cgi index bfc7eee14..290b8dbe4 100755 --- a/editusers.cgi +++ b/editusers.cgi @@ -180,6 +180,8 @@ if ($action eq 'search') { # Lock tables during the check+creation session. $dbh->bz_lock_tables('profiles WRITE', 'profiles_activity WRITE', + 'groups READ', + 'user_group_map WRITE', 'email_setting WRITE', 'namedqueries READ', 'whine_queries READ', @@ -203,8 +205,6 @@ if ($action eq 'search') { insert_new_user($login, $realname, $password, $disabledtext); my $new_user_id = $dbh->bz_last_key('profiles', 'userid'); $dbh->bz_unlock_tables(); - my $newprofile = new Bugzilla::User($new_user_id); - $newprofile->derive_regexp_groups(); userDataToVars($new_user_id); $vars->{'message'} = 'account_created'; |