Commit 341d9da3 authored by Koosha Khajeh Moogahi's avatar Koosha Khajeh Moogahi Committed by Byron Jones

Bug 794125: Make User.get ignore duplicate groups for membership look ups

r=glob, a=LpSolit
parent afa65e7b
......@@ -308,10 +308,12 @@ sub _filter_users_by_group {
@{ $group_ids || [] };
my @name_groups = map { Bugzilla::Group->check($_) }
@{ $group_names || [] };
push(@groups, @name_groups);
my %unique_groups;
foreach my $group (@groups, @name_groups) {
$unique_groups{$group->id} ||= $group;
}
my @in_group = grep { $self->_user_in_any_group($_, \@groups) }
my @in_group = grep { $self->_user_in_any_group($_, [values %unique_groups]) }
@$users;
return \@in_group;
}
......
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