Make WordPress Core


Ignore:
Timestamp:
04/13/2006 04:49:38 AM (21 years ago)
Author:
ryan
Message:

Add wp_revoke_user() and WP_User::remove_all_caps() to help those doing multi blog stuff.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/capabilities.php

    r3668 r3705  
    231231                unset($this->caps[$cap]);
    232232                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();
    233241        }
    234242
Note: See TracChangeset for help on using the changeset viewer.