Very odd problem with wp_signon
Below I pass a users credentials to wp_check_password and it returns true proving the password is correct.... however when i try to signin it return wp_error with
"ERROR: The password you entered for the username XXXXXXX is incorrect."
Please, can anybody explain why this is? and how to fix?
$password = "vdouW#DswYMH"
$hashed = wp_hash_password($password); //$P$Bydu8uFLe8CFXmtGjA71Tfv8Tyo7nH0
if (wp_check_password($password,$hashed,$user->data->ID)) {
echo "Yes, password correct".
$creds['user_login'] = $user->data->user_login;
$creds['user_password'] = $password;
$creds['remember'] = false;
$user2 = wp_signon( $creds, true );
if ( is_wp_error($user2) )
echo $user2->get_error_message().' - '.$hashed;
else
echo 'Success<br/>';
}