summaryrefslogtreecommitdiffstats
path: root/whineatnews.pl
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2016-04-27 18:50:13 +0200
committerFrédéric Buclin <LpSolit@gmail.com>2016-04-27 18:50:13 +0200
commit3891b63a1eb52076337885487f251a10580a4a85 (patch)
treedb1463894b756a6bb5114644feeec704ec886eb5 /whineatnews.pl
parentc44470a368465adfe329fcfc32492829a21878da (diff)
downloadbugzilla-3891b63a1eb52076337885487f251a10580a4a85.tar.gz
bugzilla-3891b63a1eb52076337885487f251a10580a4a85.tar.xz
Bug 218917 - Allow the login name to be different from the email address
Original patch by Gervase Markham r=gerv a=dkl
Diffstat (limited to 'whineatnews.pl')
-rwxr-xr-xwhineatnews.pl26
1 files changed, 13 insertions, 13 deletions
diff --git a/whineatnews.pl b/whineatnews.pl
index 660cc617f..2113bb819 100755
--- a/whineatnews.pl
+++ b/whineatnews.pl
@@ -47,28 +47,28 @@ my $slt_bugs = $dbh->selectall_arrayref($query, undef, 'CONFIRMED', 'NEW',
'REOPENED');
foreach my $bug (@$slt_bugs) {
- my ($id, $desc, $email) = @$bug;
- if (!defined $bugs{$email}) {
- $bugs{$email} = [];
+ my ($id, $desc, $login) = @$bug;
+ if (!defined $bugs{$login}) {
+ $bugs{$login} = [];
}
- if (!defined $desc{$email}) {
- $desc{$email} = [];
+ if (!defined $desc{$login}) {
+ $desc{$login} = [];
}
- push @{$bugs{$email}}, $id;
- push @{$desc{$email}}, $desc;
+ push @{$bugs{$login}}, $id;
+ push @{$desc{$login}}, $desc;
}
-foreach my $email (sort (keys %bugs)) {
- my $user = new Bugzilla::User({name => $email});
+foreach my $login (sort (keys %bugs)) {
+ my $user = new Bugzilla::User({name => $login});
next if $user->email_disabled;
- my $vars = {'email' => $email};
+ my $vars = {'email' => $user->email};
my @bugs = ();
- foreach my $i (@{$bugs{$email}}) {
+ foreach my $i (@{$bugs{$login}}) {
my $bug = {};
- $bug->{'summary'} = shift(@{$desc{$email}});
+ $bug->{'summary'} = shift(@{$desc{$login}});
$bug->{'id'} = $i;
push @bugs, $bug;
}
@@ -81,5 +81,5 @@ foreach my $email (sort (keys %bugs)) {
MessageToMTA($msg);
- say "$email " . join(" ", @{$bugs{$email}});
+ say $user->email . " " . join(" ", @{$bugs{$login}});
}