From: David Lawrence Date: Thu, 27 Jan 2011 22:09:29 +0000 (-0500) Subject: Bug 622679 - Autocomplete suggests inactive/disabled accounts as matches X-Git-Tag: bugzilla-4.0~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=51bd21e83bb25a463f1ccbf07032d260658c4b0e;p=thirdparty%2Fbugzilla.git Bug 622679 - Autocomplete suggests inactive/disabled accounts as matches r/a=mkanat --- diff --git a/Bugzilla/WebService/User.pm b/Bugzilla/WebService/User.pm index 3a48904330..4b11611e1c 100644 --- a/Bugzilla/WebService/User.pm +++ b/Bugzilla/WebService/User.pm @@ -193,8 +193,9 @@ sub get { if ($params->{'maxusermatches'}) { $limit = $params->{'maxusermatches'} + 1; } + my $exclude_disabled = $params->{'include_disabled'} ? 0 : 1; foreach my $match_string (@{ $params->{'match'} || [] }) { - my $matched = Bugzilla::User::match($match_string, $limit); + my $matched = Bugzilla::User::match($match_string, $limit, $exclude_disabled); foreach my $user (@$matched) { if (!$unique_users{$user->id}) { push(@user_objects, $user); @@ -531,6 +532,12 @@ C is an array of names of groups that a user can be in. If these are specified, they limit the return value to users who are in I of the groups specified. +=item C (boolean) + +By default, when using the C parameter, disabled users are excluded +from the returned results. Setting C to C will include +any users that are set to disabled in the returned results. + =back =item B @@ -609,6 +616,9 @@ function. =item C and C were added in Bugzilla B<4.0>. +=item C added in Bugzilla B<4.0>. Default behavior +for C has changed to only returning enabled accounts. + =back =back