WordPress.org

Make WordPress Core

Ticket #12711: 12711.3.patch

File 12711.3.patch, 1.2 KB (added by ocean90, 4 years ago)

removed the third argument

  • wp-admin/users.php

     
    368368        $user_object = new WP_User($userid); 
    369369        $roles = $user_object->roles; 
    370370        $role = array_shift($roles); 
    371  
    372         $style = ( ' class="alternate"' == $style ) ? '' : ' class="alternate"'; 
    373         echo "\n\t", user_row( $user_object, $style, $role, $post_counts[ $userid ] ); 
     371        if ( is_multisite() && ! empty($role) ) { 
     372                $style = ( ' class="alternate"' == $style ) ? '' : ' class="alternate"'; 
     373                echo "\n\t", user_row( $user_object, $style, $role, $post_counts[ $userid ] ); 
     374        } 
    374375} 
    375376?> 
    376377</tbody> 
  • wp-includes/capabilities.php

     
    698698        function remove_all_caps() { 
    699699                global $wpdb; 
    700700                $this->caps = array(); 
    701                 update_user_meta( $this->ID, $this->cap_key, '' ); 
    702                 update_user_meta( $this->ID, $wpdb->prefix . 'user_level', '' ); 
     701                delete_user_meta( $this->ID, $this->cap_key, ); 
     702                delete_user_meta( $this->ID, $wpdb->prefix . 'user_level' ); 
    703703                $this->get_role_caps(); 
    704704        } 
    705705