WP_User::remove_all_caps()
Remove all of the capabilities of the user.
Source
File: wp-includes/class-wp-user.php
public function remove_all_caps() { global $wpdb; $this->caps = array(); delete_user_meta( $this->ID, $this->cap_key ); delete_user_meta( $this->ID, $wpdb->get_blog_prefix() . 'user_level' ); $this->get_role_caps(); }
Changelog
Version | Description |
---|---|
2.1.0 | Introduced. |
© 2003–2021 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_user/remove_all_caps