Check that the user login name and password is correct.
$user_loginstringrequired
$user_passstringrequired
function user_pass_ok($user_login, $user_pass) {
_deprecated_function( __FUNCTION__, '3.5.0', 'wp_authenticate()' );
$user = wp_authenticate( $user_login, $user_pass );
if ( is_wp_error( $user ) )
return false;
return true;
}
| Version | Description |
|---|---|
| 3.5.0 | Use wp_authenticate() |
| 0.71 | Introduced. |
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/user_pass_ok