Changeset 13784
- Timestamp:
- 03/21/2010 01:36:54 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/capabilities.php
r13725 r13784 582 582 */ 583 583 function remove_role( $role ) { 584 if ( empty( $this->roles[$role] ) || ( count( $this->roles ) <= 1) )584 if ( !in_array($role, $this->roles) ) 585 585 return; 586 586 unset( $this->caps[$role] ); 587 587 update_user_meta( $this->ID, $this->cap_key, $this->caps ); 588 588 $this->get_role_caps(); 589 $this->update_user_level_from_caps(); 589 590 } 590 591
Note: See TracChangeset
for help on using the changeset viewer.