Skip to:
Content
Pages
Categories
Search
Top
Bottom

Calling last_active outside of member loop


  • Zoee
    Member

    @epixmedia

    Hi all, I’ve created a custom member list page so we can search and filter by custom s2Member fields in various ways.

    Most stuff is working, including things like bp_core_get_userlink and bp_add_friend_button which I have simply passed the $user_id into. However I can’t get each members last active information to display. It either returns blank or as “never updated” – any idea’s how I can call this in my custom code (ie outside of the standard buddypress member loop)?

    Thanks in advance!

Viewing 1 replies (of 1 total)

  • Roger Coathup
    Participant

    @rogercoathup

    It’s stored in the wp_user_meta table, and there are some BuddyPress wrapper functions around the standard WordPress get_user_meta() functions.

    You should be able to use:

    $activity = bp_get_user_meta( $user_id, ‘last_activity’, true );

    Let me know if that works.

    Cheers, Roger

Viewing 1 replies (of 1 total)
  • The topic ‘Calling last_active outside of member loop’ is closed to new replies.
Skip to toolbar