delete user cap in remove_all_caps(), props ocean90, see #12711
git-svn-id: http://svn.automattic.com/wordpress/trunk@13883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
3a69eacbbe
commit
fbf3ee6abc
|
@ -368,9 +368,10 @@ foreach ( $wp_user_search->get_results() as $userid ) {
|
|||
$user_object = new WP_User($userid);
|
||||
$roles = $user_object->roles;
|
||||
$role = array_shift($roles);
|
||||
|
||||
$style = ( ' class="alternate"' == $style ) ? '' : ' class="alternate"';
|
||||
echo "\n\t", user_row( $user_object, $style, $role, $post_counts[ $userid ] );
|
||||
if ( is_multisite() && ! empty($role) ) {
|
||||
$style = ( ' class="alternate"' == $style ) ? '' : ' class="alternate"';
|
||||
echo "\n\t", user_row( $user_object, $style, $role, $post_counts[ $userid ] );
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
|
|
|
@ -698,8 +698,8 @@ class WP_User {
|
|||
function remove_all_caps() {
|
||||
global $wpdb;
|
||||
$this->caps = array();
|
||||
update_user_meta( $this->ID, $this->cap_key, '' );
|
||||
update_user_meta( $this->ID, $wpdb->prefix . 'user_level', '' );
|
||||
delete_user_meta( $this->ID, $this->cap_key );
|
||||
delete_user_meta( $this->ID, $wpdb->prefix . 'user_level' );
|
||||
$this->get_role_caps();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue