Skip to:
Content
Pages
Categories
Search
Top
Bottom

Grabbing User info for Displayed User in Activity Feed

  • Avatar of jholder83864
    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)
  • Avatar of bp-help
    bp-help
    Participant

    @bphelp

    Grab it an do what? You haven’t explained what you wanna do after it is fetched.
    You can try:

    http://wordpress.org/extend/plugins/buddypress-block-activity-stream-types/

    Avatar of jholder83864
    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)

You must be logged in to reply to this topic.