Resource icon

Turn Off Email Notifications

maybe someone will need it. Turns off notifications to those whose e-mail address is hotmail.

UPDATE xf_user_option SET email_on_conversation = 0, creation_watch_state = 'watch_no_email', interaction_watch_state = 'watch_no_email' where user_id IN (select t.user_id from xf_user t where t.email like '%hotmail%')

UPDATE xf_forum_watch SET send_email = 0 where user_id IN (select t.user_id from xf_user t where t.email like '%hotmail%')

UPDATE xf_thread_watch SET email_subscribe = 0 where user_id IN (select t.user_id from xf_user t where t.email like '%hotmail%')
 
Last edited:
Are account_preferences replacements working?

View attachment 315633
No they are not (at least on 2.3) these are the replacements for account_preferences template:

Replacement 1:
PHP:
                   <xf:checkbox>
                        <xf:option value="watch_email" name="option[interaction_watch_state]" checked="{{ $xf.visitor.Option.interaction_watch_state == 'watch_email' }}"
                            label="{{ phrase('and_receive_email_notifications') }}" />
                    </xf:checkbox>
Replacement 2:
PHP:
                    <xf:checkbox>
                        <xf:option value="watch_email" name="option[creation_watch_state]" checked="{{ $xf.visitor.Option.creation_watch_state == 'watch_email' }}"
                            label="{{ phrase('and_receive_email_notifications') }}" />
                    </xf:checkbox>
Replacement 3:
PHP:
<xf:macro id="helper_account::email_options_row" arg-showConversationOption="{{ true }}" />

In all cases replace with nothing.

Result:

before.webp
 
Back
Top Bottom