WordPress.org

Make WordPress Core

Ticket #29880: 29880.3.patch

File 29880.3.patch, 1.1 KB (added by chriscct7, 5 years ago)
  • src/wp-includes/user-functions.php

     
    12351235 * @param array|object|WP_User $userdata {
    12361236 *     An array, object, or WP_User object of user data arguments.
    12371237 *
    1238  *     @type int         $ID                   User ID. If supplied, the user will be updated.
     1238 *     @type int         $ID                   User ID. If supplied, the user will be updated. This is deprecated since 4.4.
    12391239 *     @type string      $user_pass            The plain-text user password.
    12401240 *     @type string      $user_login           The user's login username.
    12411241 *     @type string      $user_nicename        The URL-friendly user name.
     
    12781278
    12791279        // Are we updating or creating?
    12801280        if ( ! empty( $userdata['ID'] ) ) {
     1281                _deprecated_argument( __FUNCTION__, '4.4', __( 'Supplying a user ID to wp_insert_user to update an existing user is deprecated. Use wp_update_user() instead.' ) );
    12811282                $ID = (int) $userdata['ID'];
    12821283                $update = true;
    12831284                $old_user_data = get_userdata( $ID );