From f45322b31e660ce344cd2859e56f4a2f129eefa5 Mon Sep 17 00:00:00 2001 From: David Lawrence Date: Mon, 30 Mar 2015 15:43:50 +0100 Subject: Bug 1141770: merge_users.pl fails if the two accounts have accessed the same bug and is in the bug_interest table --- extensions/MyDashboard/Extension.pm | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'extensions/MyDashboard') diff --git a/extensions/MyDashboard/Extension.pm b/extensions/MyDashboard/Extension.pm index d79e3e2ec..97b1d9d14 100644 --- a/extensions/MyDashboard/Extension.pm +++ b/extensions/MyDashboard/Extension.pm @@ -235,4 +235,14 @@ sub bug_end_of_update { } } +sub merge_users_before { + my ($self, $args) = @_; + my $old_id = $args->{old_id}; + my $dbh = Bugzilla->dbh; + + # If the bug_interest table has both the source user + # and destination user, then we remove the old user entry. + $dbh->do("DELETE FROM bug_interest WHERE user_id = ?", undef, $old_id); +} + __PACKAGE__->NAME; -- cgit v1.2.3-24-g4f1b