From 9d4872bef3b679b020b6678445ec84504e1f8a1e Mon Sep 17 00:00:00 2001 From: "bugreport%peshkin.net" <> Date: Fri, 19 Aug 2005 03:09:36 +0000 Subject: Bug 304583: Remove all remaining need to rederive inherited groups Patch by Joel Peshkin r=mkanat, a=justdave --- Bugzilla/Auth/Login/WWW/Env.pm | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'Bugzilla/Auth') diff --git a/Bugzilla/Auth/Login/WWW/Env.pm b/Bugzilla/Auth/Login/WWW/Env.pm index 39bea28df..64487884c 100644 --- a/Bugzilla/Auth/Login/WWW/Env.pm +++ b/Bugzilla/Auth/Login/WWW/Env.pm @@ -38,6 +38,7 @@ sub login { my $matched_userid = ''; my $matched_extern_id = ''; my $disabledtext = ''; + my $new_login_name = 0; my $dbh = Bugzilla->dbh; my $sth; @@ -122,6 +123,7 @@ sub login { ") VALUES ( ?, ?, ?, '' )"); $sth->execute($env_email, '*', $env_realname); $matched_userid = $dbh->bz_last_key('profiles', 'userid'); + $new_login_name = $matched_userid; } } } @@ -147,9 +149,16 @@ sub login { ($env_realname || $this_realname), $matched_userid); $sth->execute; + $new_login_name = $matched_userid; } } + # If the login name may be new, make sure the regexp groups are current + if ($new_login_name) { + my $userprofile = new Bugzilla::User($matched_userid); + $userprofile->derive_regexp_groups; + } + # Now we throw an error if the user has been disabled if ($disabledtext) { ThrowUserError("account_disabled", -- cgit v1.2.3-24-g4f1b