[buddypress-trac] [BuddyPress Trac] #8371: A function to get pieces of data specific to BuddyPress for a member

buddypress-trac noreply at wordpress.org
Sun Sep 27 17:17:20 UTC 2020


#8371: A function to get pieces of data specific to BuddyPress for a member
-------------------------+------------------------------------
 Reporter:  imath        |      Owner:  (none)
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Up Next
Component:  Members      |    Version:
 Severity:  normal       |   Keywords:  has-patch dev-feedback
-------------------------+------------------------------------
 If the `populate_extras` argument is set to `true` the BP_User_Query will
 populate each found users with pieces of data specific to BuddyPress:

 - the last time the each user were active,
 - the latest activity update of each user,
 - the number of friends each user has.

 I believe we should have a function to get these for one member. This
 would make it easier for the BP REST API to have a consistent item schema.
 See https://github.com/buddypress/BP-REST/pull/355.

 The function in the attached patch is making use of the
 BP_Core_User::get_user_extras() method, but what about a `BP_User` class
 extending the `WP_User` one that would do this extra populating for
 BP_User_Query and a function to get one BP Member?

 What's your opinion about it?

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


More information about the buddypress-trac mailing list