Skip to:
Content
Pages
Categories
Search
Top
Bottom

Grabbing User info for Displayed User in Activity Feed


  • jholder83864
    Participant

    @jholder83864

    HI All,
    I’ve searched far and wide for this.

    When the activity stream is rendered, it says “jholder added a photo blah blah”

    I would like to grab that id while it’s looping, but I can’t figure out where.

    Thanks guys!

Viewing 2 replies - 1 through 2 (of 2 total)

  • bp-help
    Participant

    @bphelp

    Grab it an do what? You haven’t explained what you wanna do after it is fetched.
    You can try:
    https://wordpress.org/extend/plugins/buddypress-block-activity-stream-types/


    jholder83864
    Participant

    @jholder83864

    Hi there,
    Thanks for assisting! I wanted to grab the id of the person who it is looping through the activity feed so that I can use the ID to look up what group they’re in.

    In any case, I managed to create a function to do that, and it can be used at will.

    `function BSG_is_the_best_show_ever( $array ) {

    global $activities_template;

    //var_dump($activities_template->activity->user_id);

    return $array;
    }`

    Then simply call the filter:
    `add_filter( ‘bp_get_activity_action’, ‘BSG_is_the_best_show_ever’ );`

    Again, a sincere thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Grabbing User info for Displayed User in Activity Feed’ is closed to new replies.
Skip to toolbar