XF 2.2 Automatic notifications for a User Group

Ricsca

Well-known member
How can I set that a certain user group should receive an email and a notification every time there is a new treads written in a certain node?
Thanks
 
You can force it via a database query (at your own risk).

e.g. usergroup 123 watch forum 456

Code:
INSERT IGNORE INTO xf_forum_watch
(user_id, node_id, notify_on, send_alert, send_email)
SELECT user_id, 456, 'message', 1, 1
FROM xf_user
WHERE FIND_IN_SET(123, secondary_group_ids)
ON DUPLICATE KEY UPDATE notify_on=VALUES(notify_on), send_alert=VALUES(send_alert), send_email=VALUES(send_email);

But obviously will note update if more ,members join tat usergroup
 
Back
Top Bottom