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

XF 1.2 Mass user state change

Discussion in 'XenForo Questions and Support' started by Blue, Oct 22, 2013.

  1. Blue

    Blue Well-Known Member

    I need to select a certain group via the batch update and change their state to "Awaiting email verification (from edit)" to force an email change

    The closest thing I can find is to change them to Unregistered / Unconfirmed

    What would be the best way to accomplish this?
     
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Code:
    UPDATE xf_user
    SET user_state = 'email_confirm_edit'
    WHERE user_state = 'valid'
    AND (
    	user_group_id = 2
    	OR FIND_IN_SET(2, secondary_group_ids)
    );
    
    Invalid users are given the permissions of the Unregistered group despite not being an explicit member of that group.
     
    Blue likes this.

Share This Page