wpseek.com
A WordPress-centric search engine for devs and theme authors



wp_revoke_user › WordPress Function

Since2.1.0
Deprecatedn/a
wp_revoke_user ( $id )
Parameters:
  • (int) $id User ID.
    Required: Yes
Defined at:
Codex:

Remove all capabilities from user.



Source

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

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