[comment]: # translation:outdated

[comment]: # ({7e2bc778-7e2bc778})
# 删除

[comment]: # ({/7e2bc778-7e2bc778})

[comment]: # ({849042c4-c1ef47a5})
### 描述

`object usergroup.delete(array userGroupIds)`

此方法用于删除用户组。

::: noteimportant
无法删除已[取消配置](/manual/web_interface/frontend_sections/users/authentication#配置)的用户组 (即[身份验证](/manual/api/reference/authentication/object)中`disabled_usrgrpid`指定的用户组)。
:::

::: noteclassic
此方法仅适用于*Super admin(超级管理员)*类型的用户。可在用户角色设置中撤销调用该方法的权限，参阅[用户角色](/manual/web_interface/frontend_sections/users/user_roles)获取详情。
:::

[comment]: # ({/849042c4-c1ef47a5})

[comment]: # ({22b6416d-22b6416d})
### 参数

`(array)` 需要删除的用户组ID。

[comment]: # ({/22b6416d-22b6416d})

[comment]: # ({dde57d64-dde57d64})
### 返回值

`(object)` 返回一个带有`usrgrpids`属性（其中包含被删除用户组ID）的对象。

[comment]: # ({/dde57d64-dde57d64})

[comment]: # ({b41637d2-b41637d2})
### 示例

[comment]: # ({/b41637d2-b41637d2})

[comment]: # ({0572824b-156418d8})
#### 批量删除用户组

删除两个用户组

[请求](/manual/api#执行请求):

```json
{
    "jsonrpc": "2.0",
    "method": "usergroup.delete",
    "params": [
        "20",
        "21"
    ],
    "id": 1
}
```

响应:

```json
{
    "jsonrpc": "2.0",
    "result": {
        "usrgrpids": [
            "20",
            "21"
        ]
    },
    "id": 1
}
```

[comment]: # ({/0572824b-156418d8})

[comment]: # ({9a88f22f-9a88f22f})
### 来源

CUserGroup::delete() in
*ui/include/classes/api/services/CUserGroup.php*.

[comment]: # ({/9a88f22f-9a88f22f})
