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

XF 1.5 MySQL Query to Mass Unsubscribe Users From Admin Emails

Discussion in 'XenForo Questions and Support' started by NURV, Aug 28, 2016.

  1. NURV

    NURV Member

    Hi, I'd like to mass unsubscribe all of my users with less than X posts from receiving admin emails. The mass user edit page didn't have the admin email setting as an option I can change, so I'm needing to do this with a direct database query.

    What would that query be? I'm not familiar enough with XenForo's database storage to know where this setting resides.

    Thanks!
     
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Run this query on your database:

    Code:
    UPDATE xf_user_option AS uo
    SET uo.receive_admin_email = 0
    WHERE uo.user_id IN (
    	SELECT u.user_id
    	FROM xf_user AS u
    	WHERE u.message_count < 10
    );
    
     
    NURV likes this.
  3. NURV

    NURV Member

    Thanks a lot!
     

Share This Page