wpseek.com
A WordPress-centric search engine for devs and theme authors



user_pass_ok › WordPress Function

Since0.71
Deprecated3.5.0
user_pass_ok ( $user_login, $user_pass )
Parameters: (2)
  • (string) $user_login User name.
    Required: Yes
  • (string) $user_pass User password.
    Required: Yes
See:
Returns:
  • (bool) False if does not authenticate, true if username and password authenticates.
Defined at:
Codex:

Check that the user login name and password is correct.



Source

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;
}