WordPress.org

Make WordPress Core

Changeset 13883


Ignore:
Timestamp:
03/29/2010 08:35:06 PM (11 years ago)
Author:
wpmuguru
Message:

delete user cap in remove_all_caps(), props ocean90, see #12711

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/users.php

    r13680 r13883  
    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?>
  • trunk/wp-includes/capabilities.php

    r13827 r13883  
    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    }
Note: See TracChangeset for help on using the changeset viewer.