[comment]: # translation:outdated

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

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

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

`object user.unblock(array userids)`

此方法用于解锁用户。

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

[comment]: # ({/60286833-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]: # ({40ffcaf8-2d447a22})
#### 批量解锁用户

解锁两个用户。

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

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

响应:

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

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

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

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

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