Created
March 13, 2021 00:38
-
-
Save rigwild/cd4b48c27cf7a5fb82072811372ad7be to your computer and use it in GitHub Desktop.
Reset a user's password via SQL on xenForo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UPDATE xf_user_authenticate | |
SET data = BINARY | |
CONCAT( | |
CONCAT( | |
CONCAT('a:3:{s:4:"hash";s:40:"', SHA1(CONCAT(SHA1('new-password'), SHA1('salt')))), | |
CONCAT('";s:4:"salt";s:40:"', SHA1('salt')) | |
), | |
'";s:8:"hashFunc";s:4:"sha1";}' | |
), | |
scheme_class = 'XF:Core' | |
WHERE user_id = 1; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment