wp_revoke_user

Advertisement

Summery Summery

Remove all capabilities from user.

Syntax Syntax

wp_revoke_user( int $id )

Parameters Parameters

$id

(int) (Required) User ID.

Source Source

File: wp-admin/includes/user.php

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

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

Advertisement

Changelog Changelog

Changelog
Version Description
2.1.0 Introduced.

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.