wp_revoke_user( int $id )

In this article

Remove all capabilities from user.

Parameters

$idintrequired
User ID.

Source

function wp_revoke_user( $id ) {
	$id = (int) $id;

	$user = new WP_User( $id );
	$user->remove_all_caps();
}

Changelog

VersionDescription
2.1.0Introduced.

User Contributed Notes

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