WP_User::remove_all_caps()

In this article

Removes all of the capabilities of the user.

Source

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

VersionDescription
2.1.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.