BuddyDev

Search

Bulk apply BuddyPress Profile Visibility

  • Participant
    Level: Initiated
    Posts: 3
    Gregor MacKenzie on #25071

    Hi there

    I have around 4000 users on my site, and I want to bulk apply them to be exluded from search and directory.

    I believe this is controlled by the user_meta table, keys ‘bp_exclude_in_dir’ and ‘bp_exclude_in_search’.

    If I manually set these directly editing SQL with the meta_value ‘yes’, this has no effect on hiding the user.

    If I set these by using the front end (edit user profile > settings > profile privacy) then this successfully hides the user.

    What am I missing when trying to set this manually for thousands of users?

    I need to avoid doing this via each of the 4000 user’s profiles… bulk applying using SQL code makes most sense, if I can understand which fields should be set.

  • Keymaster
    (BuddyDev Team)
    Posts: 24190
    Brajesh Singh on #25073

    Hi Gregor,
    The Bulk sql update and updating from front end have same effect. There is no difference between them.

    Please make sure the value is set to lowercase ‘yes’. Please also clear any cache(if used).

    Regards
    Brajesh

  • Participant
    Level: Initiated
    Posts: 3
    Gregor MacKenzie on #25107

    Thanks Brajesh. This only seems to take affect on the site, after I’ve done the direct SQL update, if I go into a user’s frontend profile and save their visibility preferences. This then seems to refresh the preferences for all users on the site.

  • Keymaster
    (BuddyDev Team)
    Posts: 24190
    Brajesh Singh on #25119

    Thank you for sharing the details. It is most probably some kind of cache I am assuming.

    Anyway, If it resolved for all users by only updating 1 user, that is good.

    Regards
    Brajesh

You must be logged in to reply to this topic.

This topic is: not resolved