Skip to:

Opened 11 years ago

Closed 8 years ago

#5058 closed enhancement (wontfix)

Members search - fallback to wp_users table

Reported by: dcowgill's profile dcowgill Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Core Keywords:
Cc: trisha@…


If the "Extended Profiles" component is not enabled, the members search box should query against the wp_users table.

Use case:
We currently use multi site and just added BuddyPress. We use custom user meta fields extensively so migrating over to the BP extended profiles component is not really an option. I'd imagine this is true for other site owners as well.

In this case, the members search doesn't work at all. I wasn't able to find a plugin or hook to change this behavior.

Ideally, BP search would query wp_users regardless of having the "Extended Profiles" component enabled. That way there's no dependency with that component nor the data in the wp_bp_xprofile_data table.

Change History (3)

#1 @boonebgorges
11 years ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to Future Release

A good suggestion. Patches welcome. Here's where you'd want to look:

In the meantime, you could filter 'bp_pre_user_query' and add your own sql clause.

#2 @trishasalas
11 years ago

  • Cc trisha@… added

#3 @slaFFik
8 years ago

  • Keywords needs-patch removed
  • Milestone Future Release deleted
  • Resolution set to wontfix
  • Status changed from new to closed

In title - wp_users table, that we do use in search when xprofile is deactivated (against user_login and user_nicename). See BP_User_Query::prepare_user_ids_query.

In description you are referring to wp_usermeta, which I think is what you really meant.

Searching in usermeta might be overkill, because there are lots of serialized data there, also some data is confidential and should not be available for search, so some sort of UI or API is required to make search work only for specific usermeta fields.

I believe, this is a custom plugin (per project) territory, as usermeta fields to search in should be defined for each site independently, there is not general rule here.

Also, you can already do that using bp_user_query_uid_clauses filter. See bp_xprofile_bp_user_query_search() for an example implementation.

Note: See TracTickets for help on using tickets.