Commit b0dd1758 authored by lpsolit%gmail.com's avatar lpsolit%gmail.com

Bug 297794: initBug's verification of user_id being an email is bogus - Patch by…

Bug 297794: initBug's verification of user_id being an email is bogus - Patch by Tiago R. Mello <timello@async.com.br> r=LpSolit a=myk
parent 44363502
......@@ -137,14 +137,14 @@ sub initBug {
return $self;
}
# default userid 0, or get DBID if you used an email address
unless (defined $user_id) {
# If the user is not logged in, sets $user_id to 0.
# Else gets $user_id from the user login name if this
# argument is not numeric.
my $stored_user_id = $user_id;
if (!defined $user_id) {
$user_id = 0;
}
else {
if ($user_id =~ /^\@/) {
$user_id = login_to_id($user_id);
}
} elsif (!detaint_natural($user_id)) {
$user_id = login_to_id($stored_user_id);
}
$self->{'who'} = new Bugzilla::User($user_id);
......
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