Make WordPress Core

Ticket #15458: 15458.6.diff

File 15458.6.diff, 647 bytes (added by ryan, 13 years ago)

wp_update_user() fix

  • wp-includes/user.php

     
    14141414        // First, get all of the original fields
    14151415        $user = WP_User::get_data_by('id', $ID);
    14161416
     1417        $user = get_object_vars( $user );
     1418        $meta = get_user_meta( $ID );
     1419
     1420        foreach ( $meta as $key => $value ) {
     1421                $user[ $key ] = $value[ 0 ];
     1422        }
     1423
    14171424        // Escape data pulled from DB.
    1418         $user = add_magic_quotes(get_object_vars($user));
     1425        $user = add_magic_quotes( $user );
    14191426
    14201427        // If password is changing, hash it now.
    14211428        if ( ! empty($userdata['user_pass']) ) {