WordPress.org

Ready to get started?Download WordPress

Forums

Hash Newer WP Passwords outside of WP (3 posts)

  1. tchamberlain
    Member
    Posted 5 years ago #

    This is a fairly advanced question, but I want to explain what I am doing first..

    I created a script a while back that sits in my wordpress root directory that uses wp-config connected to the wp database and would compare a password using md5 against what was in the wordpress database. If the hashes matched I then added the users IP to an .htacess file.

    This method protected my admin folder, but since the new password algo, my script no longer works.

    So my question is...
    How to take take a variable say $mypass and hash it against a retrieved variable from WP user table password field?

    All I need is the hashing I have all the other code working ie connect to db, pull the user data, now I need to see if the users pass hashes against what he supplied my script.

    Remember this is an outside script and I am not currently including any of the wp-include files, it seems what I need is located in the class-phpass.php file and don't any any issue including that in my script, but I can't seem to nail it down to what exactly.

    Thanks in advance

  2. tchamberlain
    Member
    Posted 5 years ago #

    I found the answer, thanks!

  3. aznewt
    Member
    Posted 5 years ago #

    tchamberlain, I am trying to do exactly the same. I want to protect some content on whsramsfan.com and I want to use the wp-users table for identity management. can you share the answer that you found? thanks.

Topic Closed

This topic has been closed to new replies.

About this Topic