Commit 7c6954f9 authored by justdave%bugzilla.org's avatar justdave%bugzilla.org

Bug 422111: rederive regexp-based group memberships on the destination user…

Bug 422111: rederive regexp-based group memberships on the destination user after merging Bugzilla accounts, since some of the merged group memberships may no longer apply. a=LpSolit
parent 5f77ed27
......@@ -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();
......
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