Deprecate user_pass_ok() in favor of wp_authenticate(). see #21907.
git-svn-id: https://develop.svn.wordpress.org/trunk@21911 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
7854ebaeab
commit
44cd6b7e85
@ -3224,3 +3224,23 @@ function wp_get_single_post( $postid = 0, $mode = OBJECT ) {
|
||||
return get_post( $postid, $mode, 'edit' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Check that the user login name and password is correct.
|
||||
*
|
||||
* @since 0.71
|
||||
* @deprecated 3.5.0
|
||||
* @deprecated Use wp_authenticate()
|
||||
* @see wp_authenticate()
|
||||
*
|
||||
* @param string $user_login User name.
|
||||
* @param string $user_pass User password.
|
||||
* @return bool False if does not authenticate, true if username and password authenticates.
|
||||
*/
|
||||
function user_pass_ok($user_login, $user_pass) {
|
||||
_deprecated_function( __FUNCTION__, '3.5', 'wp_authenticate()' );
|
||||
$user = wp_authenticate( $user_login, $user_pass );
|
||||
if ( is_wp_error( $user ) )
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -191,24 +191,6 @@ function count_many_users_posts( $users, $post_type = 'post' ) {
|
||||
return $count;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check that the user login name and password is correct.
|
||||
*
|
||||
* @since 0.71
|
||||
* @todo xmlrpc only. Maybe move to xmlrpc.php.
|
||||
*
|
||||
* @param string $user_login User name.
|
||||
* @param string $user_pass User password.
|
||||
* @return bool False if does not authenticate, true if username and password authenticates.
|
||||
*/
|
||||
function user_pass_ok($user_login, $user_pass) {
|
||||
$user = wp_authenticate($user_login, $user_pass);
|
||||
if ( is_wp_error($user) )
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//
|
||||
// User option functions
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user