Users: Fix incorrect docs for user authentication and login functions.
Fixes #35387 Built from https://develop.svn.wordpress.org/trunk@36245 git-svn-id: http://core.svn.wordpress.org/trunk@36212 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
2e4210e209
commit
2f41867519
|
@ -560,27 +560,29 @@ endif;
|
||||||
|
|
||||||
if ( !function_exists('wp_authenticate') ) :
|
if ( !function_exists('wp_authenticate') ) :
|
||||||
/**
|
/**
|
||||||
* Checks a user's login information and logs them in if it checks out.
|
* Authenticate a user, confirming the login credentials are valid.
|
||||||
*
|
*
|
||||||
* @since 2.5.0
|
* @since 2.5.0
|
||||||
*
|
*
|
||||||
* @param string $username User's username
|
* @param string $username User's username.
|
||||||
* @param string $password User's password
|
* @param string $password User's password.
|
||||||
* @return WP_User|WP_Error WP_User object if login successful, otherwise WP_Error object.
|
* @return WP_User|WP_Error WP_User object if the credentials are valid,
|
||||||
|
* otherwise WP_Error.
|
||||||
*/
|
*/
|
||||||
function wp_authenticate($username, $password) {
|
function wp_authenticate($username, $password) {
|
||||||
$username = sanitize_user($username);
|
$username = sanitize_user($username);
|
||||||
$password = trim($password);
|
$password = trim($password);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filter the user to authenticate.
|
* Filter whether a set of user login credentials are valid.
|
||||||
*
|
*
|
||||||
* If a non-null value is passed, the filter will effectively short-circuit
|
* A WP_User object is returned if the credentials authenticate a user.
|
||||||
* authentication, returning an error instead.
|
* WP_Error or null otherwise.
|
||||||
*
|
*
|
||||||
* @since 2.8.0
|
* @since 2.8.0
|
||||||
*
|
*
|
||||||
* @param null|WP_User $user User to authenticate.
|
* @param null|WP_User|WP_Error $user WP_User if the user is authenticated.
|
||||||
|
* WP_Error or null otherwise.
|
||||||
* @param string $username User login.
|
* @param string $username User login.
|
||||||
* @param string $password User password
|
* @param string $password User password
|
||||||
*/
|
*/
|
||||||
|
@ -841,7 +843,7 @@ endif;
|
||||||
|
|
||||||
if ( !function_exists('wp_set_auth_cookie') ) :
|
if ( !function_exists('wp_set_auth_cookie') ) :
|
||||||
/**
|
/**
|
||||||
* Sets the authentication cookies based on user ID.
|
* Login a user by setting authentication cookies.
|
||||||
*
|
*
|
||||||
* The $remember parameter increases the time that the cookie will be kept. The
|
* The $remember parameter increases the time that the cookie will be kept. The
|
||||||
* default the cookie is kept without remembering is two days. When $remember is
|
* default the cookie is kept without remembering is two days. When $remember is
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Authenticate user with remember capability.
|
* Authenticate and login a user with remember capability.
|
||||||
*
|
*
|
||||||
* The credentials is an array that has 'user_login', 'user_password', and
|
* The credentials is an array that has 'user_login', 'user_password', and
|
||||||
* 'remember' indices. If the credentials is not given, then the log in form
|
* 'remember' indices. If the credentials is not given, then the log in form
|
||||||
|
@ -104,7 +104,7 @@ function wp_signon( $credentials = array(), $secure_cookie = '' ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Authenticate the user using the username and password.
|
* Authenticate a user, confirming the username and password are valid.
|
||||||
*
|
*
|
||||||
* @since 2.8.0
|
* @since 2.8.0
|
||||||
*
|
*
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.5-alpha-36244';
|
$wp_version = '4.5-alpha-36245';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue