diff options
author | David Lawrence <dlawrence@mozilla.com> | 2011-01-27 22:49:58 +0100 |
---|---|---|
committer | David Lawrence <dlawrence@mozilla.com> | 2011-01-27 22:49:58 +0100 |
commit | f6142bf5bb569e67686f74cdfd959c79c7c7cb23 (patch) | |
tree | 26528b84ae69a6650ebb82e3252fb74f988abf3a | |
parent | e237b7e7583c6e7ab35840050d8bd9ce71ac5a6f (diff) | |
download | bugzilla-f6142bf5bb569e67686f74cdfd959c79c7c7cb23.tar.gz bugzilla-f6142bf5bb569e67686f74cdfd959c79c7c7cb23.tar.xz |
Bug 622679 - Autocomplete suggests inactive/disabled accounts as matches
r/a=mkanat
-rw-r--r-- | Bugzilla/WebService/User.pm | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/Bugzilla/WebService/User.pm b/Bugzilla/WebService/User.pm index 3a4890433..4b11611e1 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<groups> 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<any> of the groups specified. +=item C<include_disabled> (boolean) + +By default, when using the C<match> parameter, disabled users are excluded +from the returned results. Setting C<include_disabled> to C<true> will include +any users that are set to disabled in the returned results. + =back =item B<Returns> @@ -609,6 +616,9 @@ function. =item C<group_ids> and C<groups> were added in Bugzilla B<4.0>. +=item C<include_disabled> added in Bugzilla B<4.0>. Default behavior +for C<match> has changed to only returning enabled accounts. + =back =back |