用于从指定用户移除一个或多个角色。
适合在需要撤销用户权限或调整角色分配时使用。
| 参数 | 说明 |
|---|---|
<user> |
用户ID、邮箱或登录名。 |
[<role>...] |
从用户移除指定角色。 |
$ wp user remove-role 12 author
Success: Removed 'author' role for johndoe (12).
$ wp user remove-role 12 author editor
Success: Removed 'author', 'editor' roles for johndoe (12).