Commit 77788555 authored by lpsolit%gmail.com's avatar lpsolit%gmail.com

Bug 320436: New self-created accounts dont get regexp group memberships - Patch…

Bug 320436: New self-created accounts dont get regexp group memberships - Patch by Joel Peshkin <bugreport@peshkin.net> r=LpSolit a=justdave
parent be43d4b5
......@@ -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.
......
......@@ -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
......
......@@ -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';
......
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