metallicazzz
Member
Posted 1 year ago #
I'm a newbie and I'm trying to create an application that would be integrated with my wordpress website. Using phpmyadmin I have updated and changed my password using MD5 to test what value is stored in user_pass in wp_users. I do the see MD5 hash initially but after I login to the wordpress administrator, the value in user_pass changes to a format I dont recognize. Does anyone know what encryption the changed value belongs to? Because when I compare the login credentials from the my application to the values in the database, it never logs in. And yes I do convert the login credentials to MD5 hash. Please help
I haven't looked into it too much, but I'm pretty sure that WordPress uses a unique salt to hash/encrypt the passwords in the database. I'm also pretty sure that the passwords somehow incorporate the username and/or user ID in order to hash them; so even if two users use the exact same password, those two values will be different within the database.
Sorry I couldn't offer much more help.
metallicazzz
Member
Posted 1 year ago #
i solved it
<?PHP require('PATH/wp-blog-header.php'); //must appear before any page content
$theUserObj=wp_authenticate("username","password");
if(!empty($theUserObj->user_login) && !empty($theUserObj->user_pass))echo "Correct";
else echo "Incorrect";
?>