Skip to:
Content

BuddyPress.org

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#6334 closed defect (bug) (fixed)

User queries using 'member_type' return all members when no user matches specified 'member_type'

Reported by: boonebgorges's profile boonebgorges Owned by: boonebgorges's profile boonebgorges
Milestone: 2.2.2 Priority: normal
Severity: normal Version:
Component: Members Keywords:
Cc:

Description

There's a quirk in the way that 'member_type' is run through WP_Tax_Query that causes the clause to be discarded if there are no rows in the term_relationships table that match the 'bp_member_type' taxonomy term being specified in BP_User_Query. A fix is coming up.

Change History (2)

#1 @boonebgorges
10 years ago

  • Owner set to boonebgorges
  • Resolution set to fixed
  • Status changed from new to closed

In 9662:

Enforce no_results when getting a 0=1 result from the member type tax query.

When passing a 'member_type' to BP_User_Query and no users belong to the
member type, the WP_Tax_Query transformation will return a '0 = 1' clause to
indicate that no results were found. We should respect this result, so that no
members are returned for this kind of query.

Fixes #6334.

#2 @boonebgorges
10 years ago

In 9663:

Enforce no_results when getting a 0=1 result from the member type tax query.

When passing a 'member_type' to BP_User_Query and no users belong to the
member type, the WP_Tax_Query transformation will return a '0 = 1' clause to
indicate that no results were found. We should respect this result, so that no
members are returned for this kind of query.

Fixes #6334 for the 2.2 branch.

Note: See TracTickets for help on using tickets.