diff options
-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'; |