summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2005-08-13 23:04:53 +0200
committerlpsolit%gmail.com <>2005-08-13 23:04:53 +0200
commit2fe49f40feabcabebfd6604765d897cfaddd222f (patch)
treeea92fbecb9af6617587196d209372bb9645bb3e7
parent9ab537a54529b0444df941fed04565bd1f1a32b2 (diff)
downloadbugzilla-2fe49f40feabcabebfd6604765d897cfaddd222f.tar.gz
bugzilla-2fe49f40feabcabebfd6604765d897cfaddd222f.tar.xz
Bug 303824: BugMail should ignore deleted or renamed user accounts - Patch by Frédéric Buclin <LpSolit@gmail.com> r=wurblzap a=justdave
-rw-r--r--Bugzilla/BugMail.pm11
1 files changed, 7 insertions, 4 deletions
diff --git a/Bugzilla/BugMail.pm b/Bugzilla/BugMail.pm
index 35026b48e..e51f0c83b 100644
--- a/Bugzilla/BugMail.pm
+++ b/Bugzilla/BugMail.pm
@@ -358,17 +358,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;
}
}
}