Changeset 3102 for trunk/wp-includes/capabilities.php
- Timestamp:
- 11/16/2005 02:54:23 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/capabilities.php
r2904 r3102 124 124 return; 125 125 126 $this->id = $this->data->ID; 126 foreach (get_object_vars($this->data) as $key => $value) { 127 $this->{$key} = $value; 128 } 129 130 $this->id = $this->ID; 127 131 $this->cap_key = $table_prefix . 'capabilities'; 128 $this->caps = &$this-> data->{$this->cap_key};132 $this->caps = &$this->{$this->cap_key}; 129 133 if ( ! is_array($this->caps) ) 130 134 $this->caps = array(); … … 183 187 function update_user_level_from_caps() { 184 188 global $table_prefix; 185 $this-> data->user_level = array_reduce(array_keys($this->allcaps), array(&$this, 'level_reduction'), 0);186 update_usermeta($this->id, $table_prefix.'user_level', $this-> data->user_level);189 $this->user_level = array_reduce(array_keys($this->allcaps), array(&$this, 'level_reduction'), 0); 190 update_usermeta($this->id, $table_prefix.'user_level', $this->user_level); 187 191 } 188 192
Note: See TracChangeset
for help on using the changeset viewer.