Edit subscripitions via MySQL
I want to import 150 users to my forum and subscribe them to a new “test” forum topic in order to check if the email notification is working (it stops after sending 100 emails).
In order to do this, I use the plugin “import and export users and customers” to import a list of made-up users (username and email are all that is needed for columns in CSV file).
Then I create a new “test” forum.
Now I want to subscribe them all to this forum topic programmatically via MySQL.
The issue is, I have looked at the SQL table and the only data that I can find on user subscriptions is the
wp_usermeta where meta_key = 'wp__bbp_forum_subscriptions'. The
meta_valueshows the ID of the forum that users are subscribed to.
The issue is that it seems to be no longer working. Is it a meta_value that BBpress no longer uses? If so, which one is used?
If I take a random subscribed user (ID=17248) and check what they are subscribed to, the following query works:
select * from wp_usermeta where meta_key = 'wp__bbp_forum_subscriptions' and user_id = 17248;. I can then see a list in the
meta_valuetable of what they are subscribed to. But if I then (using the BBp Toolkit plugin) alter their subscriptions and e.g. unsubscribe them from a topic, go back to the DB and do the same query, it shows the same forum subscription IDs, even though there should be one less.
Could you point me in the right direction of which table to query to alter the forum topic ids of a user please?
- You must be logged in to reply to this topic.