XF 1.5 How to batch update user state?

Alpha1

Well-known member
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?
 
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:
Back
Top Bottom