0
I am developing a system with Wordpress and need to verify the current user password on the edit password screen, however I am having problems with the encryption used in wordpress. I tested the code below published in Codex itself, but I did not succeed.
<?php
$wp_hasher = new PasswordHash(8, TRUE);
$password_hashed = '$P$B55D6LjfHDkINU5wF.v2BuuzO0/XPk/';
$plain_password = 'test';
if($wp_hasher->CheckPassword($plain_password, $password_hashed)) {
echo "YES, Matched";
} else {
echo "No, Wrong Password";
}
?>
https://codex.wordpress.org/Function_Reference/wp_hash_password
Any hint?
With the line
$senhahash = $page->user_pass.'<br/>';
is giving error, change to$senhahash = $page->user_pass;
– Emerson Barcellos