Changeset 3705
- Timestamp:
- 04/13/2006 04:49:38 AM (19 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/admin-db.php
r3700 r3705 275 275 } 276 276 277 function wp_revoke_user($id) { 278 $id = (int) $id; 279 280 $user = new WP_User($id); 281 $user->remove_all_caps(); 282 } 283 277 284 function get_link($link_id, $output = OBJECT) { 278 285 global $wpdb; -
trunk/wp-includes/capabilities.php
r3668 r3705 231 231 unset($this->caps[$cap]); 232 232 update_usermeta($this->id, $this->cap_key, $this->caps); 233 } 234 235 function remove_all_caps() { 236 global $wpdb; 237 $this->caps = array(); 238 update_usermeta($this->id, $this->cap_key, ''); 239 update_usermeta($this->id, $wpdb->prefix.'user_level', ''); 240 $this->get_role_caps(); 233 241 } 234 242
Note: See TracChangeset
for help on using the changeset viewer.