Skip to:

Activities – Filter by user profile custom field.

  • Maniou



    I would like to know the best way to filter the activity feed by user profile custom field.

    Solution 1
    Add an activity meta to the activity with the profile custom field data when i want, then filter with the help of this activity meta. But i’m afraid my database is going to be quite big (I have 2millions activities actually) and with this solution i need to update my old activities.

    Solution 2
    Make one query first to get the users ids matching my profile custom field.
    then filter the activity stream with this list of users ids (Note i Have 250k users and this list can be quite large – maybe this solution is not really performant)

    Solution 3
    A custom query to get the activities ids matching what i want, then passing thoses ids to bp_activity_get (i will do paging to don’t have a big activities id list).

    Or maybe there is a better solution ?

    Thank you !

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.
Skip to toolbar