WordPress开发者和主题制作者的搜索引擎



user_pass_ok ›

Since0.71
已弃用3.5.0
user_pass_ok ( $user_login, $user_pass )
参数: (2)
  • (string) $user_login User name.
    Required: Yes
  • (string) $user_pass User password.
    Required: Yes
查看:
返回:
  • (bool) False if does not authenticate, true if username and password authenticates.
定义在:
文档:

Check that the user login name and password is correct.



源码

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