Skip to:

exclude specific user_id’s in bp_has_activity() query

  • I was looking through on this page ; 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
    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…


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