WordPress.org

Make WordPress Core

Changeset 25204


Ignore:
Timestamp:
09/02/2013 03:24:33 AM (7 years ago)
Author:
SergeyBiryukov
Message:

Update phpdoc for get_user_to_edit(), get_userdata(), and get_user_by(). props tivnet. fixes #24992.

Location:
trunk/src
Files:
2 edited

Legend:

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

    r24508 r25204  
    196196 *
    197197 * @param int $user_id User ID.
    198  * @return object WP_User object with user data.
     198 * @return WP_User|bool WP_User object on success, false on failure.
    199199 */
    200200function get_user_to_edit( $user_id ) {
    201201    $user = get_userdata( $user_id );
    202202
    203     $user->filter = 'edit';
     203    if ( $user )
     204        $user->filter = 'edit';
    204205
    205206    return $user;
  • trunk/src/wp-includes/pluggable.php

    r25107 r25204  
    116116 *
    117117 * @param int $user_id User ID
    118  * @return bool|object False on failure, WP_User object on success
     118 * @return WP_User|bool WP_User object on success, false on failure.
    119119 */
    120120function get_userdata( $user_id ) {
     
    131131 * @param string $field The field to retrieve the user with. id | slug | email | login
    132132 * @param int|string $value A value for $field. A user ID, slug, email address, or login name.
    133  * @return bool|object False on failure, WP_User object on success
     133 * @return WP_User|bool WP_User object on success, false on failure.
    134134 */
    135135function get_user_by( $field, $value ) {
     
    464464 * @param string $username User's username
    465465 * @param string $password User's password
    466  * @return WP_Error|WP_User WP_User object if login successful, otherwise WP_Error object.
     466 * @return WP_User|WP_Error WP_User object if login successful, otherwise WP_Error object.
    467467 */
    468468function wp_authenticate($username, $password) {
Note: See TracChangeset for help on using the changeset viewer.