Commit 2fe49f40 authored by lpsolit%gmail.com's avatar lpsolit%gmail.com

Bug 303824: BugMail should ignore deleted or renamed user accounts - Patch by…

Bug 303824: BugMail should ignore deleted or renamed user accounts - Patch by Frédéric Buclin <LpSolit@gmail.com> r=wurblzap a=justdave
parent 9ab537a5
...@@ -358,17 +358,20 @@ sub ProcessOneBug { ...@@ -358,17 +358,20 @@ sub ProcessOneBug {
if ($old) { if ($old) {
# You can't stop being the reporter, and mail isn't sent if you # You can't stop being the reporter, and mail isn't sent if you
# remove your vote. # remove your vote.
# Ignore people whose user account has been deleted or renamed.
if ($what eq "CC") { if ($what eq "CC") {
foreach my $cc_user (split(/[\s,]+/, $old)) { foreach my $cc_user (split(/[\s,]+/, $old)) {
push(@{$recipients{&::DBNameToIdAndCheck($cc_user)}}, my $uid = login_to_id($cc_user);
REL_CC); push(@{$recipients{$uid}}, REL_CC) if $uid;
} }
} }
elsif ($what eq "QAContact") { 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") { elsif ($what eq "AssignedTo") {
push(@{$recipients{&::DBNameToIdAndCheck($old)}}, REL_ASSIGNEE); my $uid = login_to_id($old);
push(@{$recipients{$uid}}, REL_ASSIGNEE) if $uid;
} }
} }
} }
......
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