This will probably do it (usual rules about running on a test install, backups etc. apply):
SQL:
INSERT INTO xf_forum_watch
(user_id, node_id, notify_on, send_alert, send_email)
SELECT user_id, 123, 'thread', 1, 0
FROM xf_user
WHERE FIND_IN_SET(4, secondary_group_ids)
You'd need to run it for each node_id and user group ID. 123 represents the node_id and 4 represents the user group. This will only check the usergroup against the secondary_group_ids field.
@Chris D & @Brogan I would like to ask a question about watched threads and forums. Is there maybe a query I can run to stop watching threads and forums for banned users? Otherwise, is there no other way to do this, out of Admin Control Panel?
@Chris D & @Brogan I would like to ask a question about watched threads and forums. Is there maybe a query I can run to stop watching threads and forums for banned users? Otherwise, is there no other way to do this, out of Admin Control Panel?
@Mr Lucky & @ozzy47 Yeah you are both right but it doesn't matter. Let's say you have 10K banned user. So what will happen then? It means storage of a lot of data in a database. This is what I meant.
Strange, I just reran this query as there are users who registered since the last timeand am getting the duplicate entry error even with INSERT IGNORE INTO. instead of INSERT INTO
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.