[buddypress-trac] [BuddyPress] #5155: Messaging: ajax autocomplete does not work if users want to send an email to users login name

buddypress-trac noreply at wordpress.org
Mon Sep 2 17:21:20 UTC 2013

#5155: Messaging: ajax autocomplete does not work if users want to send an email
to users login name
 Reporter:  quan_flo                |       Owner:
     Type:  defect (bug)            |      Status:  new
 Priority:  normal                  |   Milestone:  1.9
Component:  Core                    |     Version:  1.8.1
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |
Changes (by boonebgorges):

 * milestone:  Awaiting Review => 1.9


 Thanks very much, imath. This is getting close to what I was envisioning.

 However, if we're going to fix the problem originally reported in this
 ticket - which was not directly connected to the xprofile component - we
 should *really* fix it. Instead of this logic:

 if ( bp_is_active( 'xprofile' ) ) {
     search the profile fields
 } else {
     search the user fields

 I was thinking we'd do something more comprehensive, like this:

 $found_user_ids = select from wp_users ...

 if ( bp_is_active( 'xprofile' ) ) {
     $profile_found_user_ids = select from xprofile ...
     $found_user_ids = array_unique( array_merge( $profile_found_user_ids,
 $found_user_ids ) );

 That way, it'll be possible to match against the user table fields
 regardless of whether xprofile is enabled.

 > In 5155.diff i've also added a bp_is_active( 'xprofile' ) in
 BP_Core_User::search_users() as some admin can eventually use the
 bp_use_legacy_user_query filter.

 Yeah, it looks like this will fix a separate bug, which is that the
 `search_users()` method will fail if xprofile is disabled. We'll handle it
 in a different commit (it's fine to keep it in this ticket).

 > I'm not using friends_search_friends() anymore in the patch, but i think
 it's best to leave it if some plugins/themes are using it..

 Sounds good.

 I would also like to have unit tests for the new search logic in
 `BP_User_Query` before making the proposed changes.

 So, we're close enough that I'll move this to 1.9. Thanks for your work so
 far, imath.

Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5155#comment:4>
BuddyPress <http://buddypress.org/>

More information about the buddypress-trac mailing list