[buddypress-trac] [BuddyPress Trac] #6577: friends_check_friendship_status() problem when using legacy user query

buddypress-trac noreply at wordpress.org
Wed Aug 5 18:25:45 UTC 2015


#6577: friends_check_friendship_status() problem when using legacy user query
---------------------------------+-----------------------
 Reporter:  r-a-y                |      Owner:
     Type:  defect (bug)         |     Status:  new
 Priority:  normal               |  Milestone:  2.4
Component:  Component - Friends  |    Version:  2.1
 Severity:  normal               |   Keywords:  has-patch
---------------------------------+-----------------------
 This is a follow-up to #5703.

 boonebgorges alerted me of a problem when using the legacy user query -
 `add_filter( 'bp_use_legacy_user_query', '__return_true' )` - and checking
 the friendship status in the members loop.

 When using the legacy user query, the friendship button would always
 return "Add Friend" instead of using the actual friendship status.

 Bug is due to me using `has_filter( 'bp_user_query_populate_extras',
 'bp_friends_filter_user_query_populate_extras' )`.

 I've moved the logic for setting the `'not_friends'` status directly to
 the `bp_friends_filter_user_query_populate_extras()` filter.

 This should fix the problem.  Existing unit tests should cover this test
 (`@group friends_check_friendship_status`).

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


More information about the buddypress-trac mailing list