Skip to:
Content
Pages
Categories
Search
Top
Bottom

exclude specific user_id’s in bp_has_activity() query

  • @username_

    Member

    I was looking through on this page http://codex.buddypress.org/developer-docs/custom-buddypress-loops/the-activity-stream-loop/ ; and in the actual function docs to see the filtering options and scope options to use for such a task. I didn’t see an exclude option for user_id just activity_id. Seems if it has include exclude shouldn’t be too difficult. right?

    I see the ability to include user_ids to be queried and that it can be an array of user_ids, most likely for the single member pages. But this is inclusive and I would like to exclude some users from the main activity wall. Say user A doesn’t want to see user B’s updates anymore because they are negative… I wouldn’t want to include all members but user B that seems silly.

    I found this helpful page
    http://blog.etiviti.com/2010/03/buddypress-hack-remove-non-friend-updates-from-the-activity-stream/
    to allow me to do a filter hook on bp_has_activities after it’s queried, however I thought it would be better to do it on the query itself and not after.

    Any thoughts if someone has run into this sort of thing before or has any ideas? If not I will most likely go with unsetting the activities array but seems to me it would be so much faster to have it inside the query to do…

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘exclude specific user_id’s in bp_has_activity() query’ is closed to new replies.
Skip to toolbar