Skip to content

Instantly share code, notes, and snippets.

@rigwild
Created March 13, 2021 00:38
Show Gist options
  • Save rigwild/cd4b48c27cf7a5fb82072811372ad7be to your computer and use it in GitHub Desktop.
Save rigwild/cd4b48c27cf7a5fb82072811372ad7be to your computer and use it in GitHub Desktop.
Reset a user's password via SQL on xenForo
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