WordPress.org

Make WordPress Core

Ticket #5607: remove_admin_notices8.diff

File remove_admin_notices8.diff, 2.0 KB (added by filosofo, 10 years ago)
  • wp-admin/includes/user.php

     
    217217
    218218function get_user_to_edit( $user_id ) {
    219219        $user = new WP_User( $user_id );
    220         $user->user_login   = attribute_escape($user->user_login);
    221         $user->user_email   = attribute_escape($user->user_email);
    222         $user->user_url     = clean_url($user->user_url);
    223         $user->first_name   = attribute_escape($user->first_name);
    224         $user->last_name    = attribute_escape($user->last_name);
    225         $user->display_name = attribute_escape($user->display_name);
    226         $user->nickname     = attribute_escape($user->nickname);
    227         $user->aim          = attribute_escape($user->aim);
    228         $user->yim          = attribute_escape($user->yim);
    229         $user->jabber       = attribute_escape($user->jabber);
    230         $user->description  =  wp_specialchars($user->description);
     220        $user->user_login   = ( isset($user->user_login) ) ? attribute_escape($user->user_login) : '';
     221        $user->user_email   = ( isset($user->user_email) ) ? attribute_escape($user->user_email) : '';
     222        $user->user_url     = ( isset($user->user_url) ) ? clean_url($user->user_url) : '';
     223        $user->first_name   = ( isset($user->first_name) ) ? attribute_escape($user->first_name) : '';
     224        $user->last_name    = ( isset($user->last_name) ) ? attribute_escape($user->last_name) : '';
     225        $user->display_name = ( isset($user->display_name) ) ? attribute_escape($user->display_name) : '';
     226        $user->nickname     = ( isset($user->nickname) ) ? attribute_escape($user->nickname) : '';
     227        $user->aim          = ( isset($user->aim) ) ? attribute_escape($user->aim) : '';
     228        $user->yim          = ( isset($user->yim) ) ? attribute_escape($user->yim) : '';
     229        $user->jabber       = ( isset($user->jabber) ) ? attribute_escape($user->jabber) : '';
     230        $user->description  = ( isset($user->description) ) ? wp_specialchars($user->description) : '';
    231231
    232232        return $user;
    233233}
     
    281281        $user->remove_all_caps();
    282282}
    283283