WordPress.org

Make WordPress Core

Changeset 13784


Ignore:
Timestamp:
03/21/2010 01:36:54 AM (10 years ago)
Author:
dd32
Message:

Fix WP_User::remove_role(). See #10285

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/capabilities.php

    r13725 r13784  
    582582     */
    583583    function remove_role( $role ) {
    584         if ( empty( $this->roles[$role] ) || ( count( $this->roles ) <= 1 ) )
     584        if ( !in_array($role, $this->roles) )
    585585            return;
    586586        unset( $this->caps[$role] );
    587587        update_user_meta( $this->ID, $this->cap_key, $this->caps );
    588588        $this->get_role_caps();
     589        $this->update_user_level_from_caps();
    589590    }
    590591
Note: See TracChangeset for help on using the changeset viewer.