• Upgrade Your Account
    Hello Guest ! Upgrade your account to download from our sections Here.
    How to upgrade your account to download resources Learn More.
    Guest need to see List rather permanently banned Members Learn More.
    Guest need to read through our rules and regulations Learn More.

Tutorials Password Reset Query

Status
Not open for further replies.

NullXF

Team NullXF
XF Root
Messages
9,303
Resources
3,292
Likes
3,687
#1
NullXF submitted a new resource:

Password Reset Query - A database query to reset a user's password. Useful for recovery of admin login.

You can use this query to reset a user's password. It is especially useful if you forget your admin password.

You need to replace new-password and 1 (the user_id). You don't have to change salt, but if you do then both instances need to be the same.

Rich (BB code):
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'))...
Read more about this resource...
 
Status
Not open for further replies.