From d19fc98deb6f28d5c25a00f16192b87414d95cf7 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Sat, 13 Aug 2005 21:07:43 +0000 Subject: [PATCH] =?utf8?q?Bug=20303824:=20BugMail=20should=20ignore=20dele?= =?utf8?q?ted=20or=20renamed=20user=20accounts=20-=20Patch=20by=20Fr=C3=A9?= =?utf8?q?d=C3=A9ric=20Buclin=20=20r=3Dwurblzap=20a=3Dj?= =?utf8?q?ustdave?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- Bugzilla/BugMail.pm | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Bugzilla/BugMail.pm b/Bugzilla/BugMail.pm index faa30b0902..b6c5badfad 100644 --- a/Bugzilla/BugMail.pm +++ b/Bugzilla/BugMail.pm @@ -39,6 +39,7 @@ use base qw(Exporter); use Bugzilla::Constants; use Bugzilla::Config qw(:DEFAULT $datadir); use Bugzilla::Util; +use Bugzilla::User; use Mail::Mailer; use Mail::Header; @@ -362,16 +363,20 @@ sub ProcessOneBug($$) { if ($old) { # You can't stop being the reporter, and mail isn't sent if you # remove your vote. + # Ignore people whose user account has been deleted or renamed. if ($what eq "CC") { foreach my $cc_user (split(/[\s,]+/, $old)) { - push(@{$recipients{DBNameToIdAndCheck($cc_user)}}, REL_CC); + my $uid = login_to_id($cc_user); + push(@{$recipients{$uid}}, REL_CC) if $uid; } } elsif ($what eq "QAContact") { - push(@{$recipients{DBNameToIdAndCheck($old)}}, REL_QA); + my $uid = login_to_id($old); + push(@{$recipients{$uid}}, REL_QA) if $uid; } elsif ($what eq "AssignedTo") { - push(@{$recipients{DBNameToIdAndCheck($old)}}, REL_ASSIGNEE); + my $uid = login_to_id($old); + push(@{$recipients{$uid}}, REL_ASSIGNEE) if $uid; } } } -- 2.47.2