diff --git wp-includes/capabilities.php wp-includes/capabilities.php
index b93e2a8..69d637c 100644
|
|
class WP_User { |
718 | 718 | * @param string $role Role name. |
719 | 719 | */ |
720 | 720 | function set_role( $role ) { |
721 | | foreach ( (array) $this->roles as $oldrole ) |
722 | | unset( $this->caps[$oldrole] ); |
723 | | |
724 | 721 | if ( 1 == count( $this->roles ) && $role == $this->roles[0] ) |
725 | 722 | return; |
726 | 723 | |
| 724 | foreach ( (array) $this->roles as $oldrole ) |
| 725 | unset( $this->caps[$oldrole] ); |
| 726 | |
727 | 727 | if ( !empty( $role ) ) { |
728 | 728 | $this->caps[$role] = true; |
729 | 729 | $this->roles = array( $role => true ); |