/
Members search doesn't work

Thanks for using Woffice! If you have any issue or question, feel free to open a ticket at https://woffice.io/support/

Members search doesn't work

Version 2.6.0 comes with a bug: if the prefix of your database is different than "wp_", then the members search will always return an empty result. This will be fixed in the version 2.6.1, but if you need a quick solution, then you can do in this way:


  1. Open the file woffice/inc/buddypress.php
  2. Search for (line 2122): 

    $sql['where']['search'] .= "OR u.ID IN ( SELECT user_id FROM wp_usermeta WHERE ( meta_key = 'first_name' AND meta_value LIKE '%s' OR meta_key = 'last_name' AND meta_value LIKE '%s' ) )";
  3. Replace with:

    $sql['where']['search'] .= "OR u.ID IN ( SELECT user_id FROM " . $wpdb->prefix. "usermeta WHERE ( meta_key = 'first_name' AND meta_value LIKE '%s' OR meta_key = 'last_name' AND meta_value LIKE '%s' ) )";
  4. That's done.


Related content

Use Display Name instead of Username
Use Display Name instead of Username
More like this
Members directory
Members directory
More like this
Site Privacy
More like this
How to Add Users to BuddyPress Groups in Bulk
How to Add Users to BuddyPress Groups in Bulk
More like this
Groups integration
Groups integration
More like this
This Webpage has a redirect loop
This Webpage has a redirect loop
More like this

If you have any issue or question, feel free to open a ticket at https://woffice.io/support/