Skip to:
Content
Pages
Categories
Search
Top
Bottom

Subscribe Existing Users to New Forum

  • @wpneedsupport

    Participant

    How to subscribe existing wp users to a newly created forum? Currently new users are auto-subscribed to existing forums, but there does not seem to be a way to subscribe existing wp users to a new forum. Forums on our site are viewable via log-in only. https://weightinclusivemedicine.org/forums/

    Is there an easy way to do it through wp database?
    Using 2.6.11 bbpress WordPress 6.7.1

Viewing 3 replies - 1 through 3 (of 3 total)
  • @robin-w

    Moderator

    forum subscribed users are held in post_meta database for the forum

    so if the forum is ID 2927, then in post_meta you would have an entry for each subscribed user eg

    `

    post_id		meta_key			Meta_value
    2927		_bbp_subscription 	1371
    2927 		_bbp_subscription 	1372

    would mean that user_ID’s 1371 and 1372 are subscribed to forum 2927

    @wpneedsupport

    Participant

    Thank you so much. I was able to locate. A few follow up questions:
    – Is there a way to determine which forum the post id corresponds with? I see more unique post_id’s than I have forums (only 2).
    – What would the command be to add users to each forum ID? Is there a way to optimize for 100+ users?
    – Do you know where in the database bbpprivategroups data is stored?

    @robin-w

    Moderator

    users can subscribe to forums and topics, both work the same way. The post ID is either a forum or topic.

    Not suer what you mean by command – if sql then I cannot help you. If php then you would use get_users and loop through that and use

    bbp_add_user_subscription( $user_id, $forum_id )

    private groups – the code simply checks matches. Users have a user_meta entry of ‘private_group’ and forums have a post_meta of ‘_private_group’ the general settings are stored in the options table

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