How i comparisons password & login via ajax using wp functions ? If user enter wrong password show error msj else ok. I try this code
$username = '';
$password = '';
$auth = wp_authenticate( $username, $password );
if ( is_wp_error( $auth ) ) {
$error_string = $auth->get_error_message();
echo '<div id="message" class="error"><p>' . $error_string . '</p></div>';
}
else {
echo "Ok!";
}