[buddypress-trac] [BuddyPress Trac] #6366: In `BP_User_Query`, allow xprofile fields to be toggled when searching

buddypress-trac noreply at wordpress.org
Fri Apr 10 13:34:00 UTC 2015

#6366: In `BP_User_Query`, allow xprofile fields to be toggled when searching
 Reporter:  boonebgorges  |      Owner:
     Type:  enhancement   |     Status:  new
 Priority:  normal        |  Milestone:  2.3
Component:  API           |    Version:
 Severity:  normal        |   Keywords:
 When passing 'search_terms' to `BP_User_Query`, the following fields are
 matched: wp_users.user_login, wp_users.user_nicename, and all
 xprofile_data fields. This is mainly for legacy reasons: when
 `BP_User_Query` was first built, I tried to match the behavior of
 `BP_Core_User`, which was to match all xprofile fields.

 But this behavior is pretty odd in many cases. Often - perhaps usually? -
 searching for a user ought to mean searching by that user's name.

 We might consider changing the default behavior of 'search_terms' in the
 medium term. In the short term, I'd like to introduce something to
 `BP_User_Query` that allows the caller to dictate which field(s) to match
 - either a param like 'search_fields', or at the very least, a filter.

 See #5155, #4821, #6211 for some related issues.

Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6366>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac

More information about the buddypress-trac mailing list