Changeset 3859 for trunk/wp-includes/capabilities.php
- Timestamp:
- 06/10/2006 08:26:26 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/capabilities.php
r3846 r3859 175 175 //Build $allcaps from role caps, overlay user's $caps 176 176 $this->allcaps = array(); 177 foreach( $this->roles as $role) {177 foreach( (array) $this->roles as $role) { 178 178 $role = $wp_roles->get_role($role); 179 179 $this->allcaps = array_merge($this->allcaps, $role->capabilities); … … 200 200 foreach($this->roles as $oldrole) 201 201 unset($this->caps[$oldrole]); 202 $this->caps[$role] = true; 203 $this->roles = array($role => true); 202 if ( !empty($role) ) { 203 $this->caps[$role] = true; 204 $this->roles = array($role => true); 205 } else { 206 $this->roles = false; 207 } 204 208 update_usermeta($this->id, $this->cap_key, $this->caps); 205 209 $this->get_role_caps();
Note: See TracChangeset
for help on using the changeset viewer.