Skip to:
Content

BuddyPress.org

Opened 14 years ago

Closed 14 years ago

#2593 closed enhancement (fixed)

[patch] Apply filters to sql query in BP_Core_User::get_users() (has patch)

Reported by: boonebgorges's profile boonebgorges Owned by:
Milestone: 1.2.6 Priority: major
Severity: Version:
Component: Core Keywords: has-patch, needs-testing
Cc:

Description

Until we get better filtering all the way up the bp_has_members chain, this is a harmless substitute.

Attachments (2)

filter_get_users_sql.patch (1.1 KB) - added by boonebgorges 14 years ago.
filter_get_users_sql_better.patch (1.1 KB) - added by boonebgorges 14 years ago.

Download all attachments as: .zip

Change History (8)

#1 @boonebgorges
14 years ago

  • Summary changed from Apply filters to sql query in BP_Core_User::get_users() to Apply filters to sql query in BP_Core_User::get_users() (has patch)
  • Type changed from defect to enhancement

#2 @boonebgorges
14 years ago

Paul suggested passing the array along too, which makes it all the awesomer. See second patch.

#3 @johnjamesjacoby
14 years ago

Would like Andy's blessing before we add filters directly to SQL queries. If you can get Andy to thumb-up this in here, I'll make it so for you. I'm thinking there should be another way to do this.

#4 @boonebgorges
14 years ago

One better way is to have more passable parameters to bp_has_members(), but that kind of rewrite seems like a stretch for a maintenance release like 1.2.6. FWIW, WP's query.php has filters like this all over the place on its SQL queries, in particular posts_request right before the query is run.

#5 @paulhastings0
14 years ago

  • Keywords changed from has-patch needs-testing to has-patch, needs-testing
  • Summary changed from Apply filters to sql query in BP_Core_User::get_users() (has patch) to [patch] Apply filters to sql query in BP_Core_User::get_users() (has patch)

#6 @johnjamesjacoby
14 years ago

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

(In [3224]) Add filters to get_users query. Fixes #2593. Props boonebgorges.

Note: See TracTickets for help on using tickets.