[comment]: # translation:outdated

[comment]: # ({8790eaaa-8790eaaa})
# 解锁用户

[comment]: # ({/8790eaaa-8790eaaa})

[comment]: # ({2b232217-ae802b92})
### 描述

`object user.unblock(array userids)`

此方法用于解锁用户.

::: noteclassic
此方法仅适用于*Super admin* 类型的用户. 可在用户角色配置中撤销对此方法的使用. 参阅[角色](/manual/web_interface/frontend_sections/administration/user_roles)获取详情.
:::

[comment]: # ({/2b232217-ae802b92})

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

`(array)` 需要解锁用户的ID.

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

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

`(object)` 返回一个带有`userids`属性（其中包含被解锁用户ID）的对象.

[comment]: # ({/751d77e0-751d77e0})

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

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

[comment]: # ({a04154e8-2d447a22})
#### 批量解锁用户

解锁两个用户.

请求:

```json
{
    "jsonrpc": "2.0",
    "method": "user.unblock",
    "params": [
        "1",
        "5"
    ],
    "auth": "3a57200802b24cda67c4e4010b50c065",
    "id": 1
}
```

返回:

```json
{
    "jsonrpc": "2.0",
    "result": {
        "userids": [
            "1",
            "5"
        ]
    },
    "id": 1
}
```

[comment]: # ({/a04154e8-2d447a22})

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

CUser::unblock() in *ui/include/classes/api/services/CUser.php*.

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