Make WordPress Core


Ignore:
Timestamp:
01/09/2016 08:51:13 PM (8 years ago)
Author:
ericlewis
Message:

Users: Fix incorrect docs for user authentication and login functions.

Fixes #35387

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/pluggable.php

    r36102 r36245  
    561561if ( !function_exists('wp_authenticate') ) :
    562562/**
    563  * Checks a user's login information and logs them in if it checks out.
     563 * Authenticate a user, confirming the login credentials are valid.
    564564 *
    565565 * @since 2.5.0
    566566 *
    567  * @param string $username User's username
    568  * @param string $password User's password
    569  * @return WP_User|WP_Error WP_User object if login successful, otherwise WP_Error object.
     567 * @param string $username User's username.
     568 * @param string $password User's password.
     569 * @return WP_User|WP_Error WP_User object if the credentials are valid,
     570 *                          otherwise WP_Error.
    570571 */
    571572function wp_authenticate($username, $password) {
     
    574575
    575576    /**
    576      * Filter the user to authenticate.
    577      *
    578      * If a non-null value is passed, the filter will effectively short-circuit
    579      * authentication, returning an error instead.
     577     * Filter whether a set of user login credentials are valid.
     578     *
     579     * A WP_User object is returned if the credentials authenticate a user.
     580     * WP_Error or null otherwise.
    580581     *
    581582     * @since 2.8.0
    582583     *
    583      * @param null|WP_User $user     User to authenticate.
    584      * @param string       $username User login.
    585      * @param string       $password User password
     584     * @param null|WP_User|WP_Error $user     WP_User if the user is authenticated.
     585     *                                        WP_Error or null otherwise.
     586     * @param string                $username User login.
     587     * @param string                $password User password
    586588     */
    587589    $user = apply_filters( 'authenticate', null, $username, $password );
     
    842844if ( !function_exists('wp_set_auth_cookie') ) :
    843845/**
    844  * Sets the authentication cookies based on user ID.
     846 * Login a user by setting authentication cookies.
    845847 *
    846848 * The $remember parameter increases the time that the cookie will be kept. The
Note: See TracChangeset for help on using the changeset viewer.