XF 2.1 Wipe all passwords

Tai Coromandel

Active member
I need to wipe all XF local passwords because we only allow login over our custom OAuth2 provider. Unfortunately, some users have managed to get local passwords on their accounts when they shouldn't have through an old XF addon. This is causing problems with 2FA and other sections that require a password.

Would this SQL query from XF 1 still work in XF 2?

Code:
UPDATE xf_user_authenticate
SET data = BINARY 'a:0:{}', scheme_class = 'XenForo_Authentication_NoPassword'
WHERE user_id = 1

I'd just change to "WHERE user_id != [my user id]" to wipe everyone's passwords but my own.
 
Ok, after taking a look at XF2 no password accounts, the scheme_class is now XF:NoPassword . The modified SQL query below is what I think should work for XF2, and specify all users that should not have a password wiped (in my case, administrators).

SQL:
UPDATE xf_user_authenticate
SET data = BINARY 'a:0:{}', scheme_class = 'XF:NoPassword'
WHERE user_id NOT IN ( 'id1', 'id2', 'id3', 'id4' )
 
Back
Top Bottom