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

XF 1.5 How to batch update user state?

Alfa1

Well-known member
#1
After migration from vb I have 10k users with the user state 'Awaiting email confirmation' and more than 0 posts. These users should have 'Email invalid (bounced)' user state. How do I update the user state of all these users? Is there a query that I can use?
 

EQnoble

Well-known member
#2
I am not sure if the user state is cached anywhere or if there is anything that would inhibit a query from working to the end result you seek but this query would change the state of the user from waiting on the email confirmation to being a valid user.

Code:
UPDATE `xf_user` set `user_state` = 'valid' WHERE `user_state` = 'email_confirm' AND `message_count`>'0'and `is_banned`='0';
 
Last edited: