XF 2.0 Disable receive email notifications

Nirjonadda

Well-known member
I have Disabled receive email notifications for new member. Turn off email notifications for watched threads/new threads etc default for new members.

f76c0ca7-f82f-4cb0-bd93-ca984f33d496.png


Please let me know that How to Turn off email notifications for watched threads/new threads etc for current members? One enable Alerts, no email notifications.
 
You'll need to fire up some queries manually I guess. Make sure to backup your database before you do that.

SQL:
UPDATE xf_user_option SET creation_watch_state = "watch_no_email" WHERE creation_watch_state = "watch_email";
UPDATE xf_user_option SET interaction_watch_state = "watch_no_email" WHERE interaction_watch_state = "watch_email";
UPDATE xf_user_option SET email_on_conversation = 0;
 
You'll need to fire up some queries manually I guess. Make sure to backup your database before you do that.

SQL:
UPDATE xf_user_option SET creation_watch_state = watch_no_email WHERE creation_watch_state = watch_email;
UPDATE xf_user_option SET interaction_watch_state = watch_no_email WHERE interaction_watch_state = watch_email;
UPDATE xf_user_option SET email_on_conversation = 0;

I only need disable for Post thread and reply.
 
I don't think this is easily possible because both states above combine a lot of things, like Thread, Conversation, Profile Posts, Replies, Likes, etc. Maybe someone else has a suggestion.
 
UPDATE xf_user_option SET creation_watch_state = "watch_no_email" WHERE creation_watch_state = "watch_email"; UPDATE xf_user_option SET interaction_watch_state = "watch_no_email" WHERE interaction_watch_state = "watch_email"; UPDATE xf_user_option SET email_on_conversation = 0;

Okay, that seemed to work. :)
 
Sorry to resurrect an old thread, but you all seem to have great knowledge of the SQL queries that I think I need to run and was hoping for suggestions. We recently upgraded from vB to xF and while all of our members Subscribed Threads from vB did transfer over to xF as Watched threads properly, the email notifications are not going out for these threads. (They work for new threads created in xF, so the mail server itself is fine.)

As a test on my own profile, I went through and mass-disabled all of my Watched thread email notifications and then mass-enabled them again and now I DO get email notifications.

Is there an SQL query I can run that will disable email notifications on all Watched threads for all users and then another one where I can enable them again on Watched threads for all users? I suspect I could put it together with the suggestions above, but if anyone knows it off the top of their head, that would prevent a potential disaster in my database. :)

Full disclosure, it looks like the query in the post above will work but wanted confirmation before trying.

Thanks!
 
Last edited:
Okay, that seemed to work. :)
You forgot to set all existing thread watches as non-email watch.

I added one more SQL query at the end of what you have tried:
SQL:
UPDATE xf_user_option SET creation_watch_state = "watch_no_email" WHERE creation_watch_state = "watch_email"; UPDATE xf_user_option SET interaction_watch_state = "watch_no_email" WHERE interaction_watch_state = "watch_email"; UPDATE xf_user_option SET email_on_conversation = 0; UPDATE xf_thread_watch SET email_subscribe = 0 WHERE email_subscribe = 1;
 
Last edited:
Back
Top Bottom