From b4c91adafa45e4e1146ca1dabab27404dac6bab6 Mon Sep 17 00:00:00 2001 From: Reed Loden Date: Thu, 6 May 2010 22:44:58 -0500 Subject: Bug 395451 - "Bugzilla::BugMail needs to use Bug objects internally instead of direct SQL" [r=mkanat a=mkanat] --- contrib/sendbugmail.pl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'contrib/sendbugmail.pl') diff --git a/contrib/sendbugmail.pl b/contrib/sendbugmail.pl index f4bebabc6..51de9407d 100755 --- a/contrib/sendbugmail.pl +++ b/contrib/sendbugmail.pl @@ -56,13 +56,14 @@ if ($changer !~ /$match/) { print STDERR "Changer \"$changer\" doesn't match email regular expression.\n"; usage(); } -if(!login_to_id($changer)) { - print STDERR "\"$changer\" is not a login ID.\n"; +my $changer_user = new Bugzilla::User({ name => $changer }); +unless ($changer_user) { + print STDERR "\"$changer\" is not a valid user.\n"; usage(); } # Send the email. -my $outputref = Bugzilla::BugMail::Send($bugnum, {'changer' => $changer }); +my $outputref = Bugzilla::BugMail::Send($bugnum, {'changer' => $changer_user }); # Report the results. my $sent = scalar(@{$outputref->{sent}}); -- cgit v1.2.3-24-g4f1b