1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.4 Disable multiple members' "Receive site mailings" option at once

Discussion in 'XenForo Questions and Support' started by markku, Jan 27, 2015.

  1. markku

    markku Well-Known Member

    With the following query (thanks @Andy.N) one can put several users into the Email invalid (bounced) state.
    Code:
    update `xf_user`
    set user_state = 'email_bounce'
    where email IN ('email1@domain.com', 'email2@domain.com')
    The question is, does anyone know of a similar query but which would disable the accounts' "Receive site mailings" option that are associated with the said emails?

    Is it possible to do with a simple query?
     
  2. Valhalla

    Valhalla Well-Known Member

    Code:
    UPDATE xf_user_option AS user_option
         SET user_option.receive_admin_email='0'
    WHERE user_option.user_id IN
         (SELECT user_id FROM xf_user WHERE email IN ('', ''))
     
    thumped and markku like this.

Share This Page