]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 422111: rederive regexp-based group memberships on the destination user after...
authorjustdave%bugzilla.org <>
Tue, 11 Mar 2008 20:50:04 +0000 (20:50 +0000)
committerjustdave%bugzilla.org <>
Tue, 11 Mar 2008 20:50:04 +0000 (20:50 +0000)
a=LpSolit

contrib/merge-users.pl

index 70250a1eeb1b893803db89a9cb3ccee3c5b2382f..80c516e04c2927a5c3661d11e1108aa04eabd992 100644 (file)
@@ -49,6 +49,7 @@ use lib qw(. lib);
 use Bugzilla;
 use Bugzilla::Constants;
 use Bugzilla::Util;
+use Bugzilla::User;
 
 use Getopt::Long;
 use Pod::Usage;
@@ -229,6 +230,12 @@ print "OK, records in the 'mailto' column of the 'whine_schedules' table\n" .
 # Delete the old record from the profiles table.
 $dbh->do('DELETE FROM profiles WHERE userid = ?', undef, $old_id);
 
+# rederive regexp-based group memberships, because we merged all memberships
+# from all of the accounts, and since the email address isn't the same on
+# them, some of them may no longer match the regexps.
+my $user = new Bugzilla::User($new_id);
+$user->derive_regexp_groups();
+
 # Commit the transaction
 $dbh->bz_commit_transaction();