[comment]: # ({860084e0-860084e0})
# user.logout

[comment]: # ({/860084e0-860084e0})

[comment]: # ({c9034746-16cc3db9})
### 说明

`string/object user.logout(array)`

这个方法用于用户登出API与使当前认证令牌失效。

[comment]: # ({/c9034746-16cc3db9})

[comment]: # ({16cc3db9-4fa8a419})
### Description

`string/object user.logout(array)`

This method allows to log out of the API and invalidates the current
authentication token.

[comment]: # ({/16cc3db9-4fa8a419})

[comment]: # ({1f719bf4-66018290})
### 参数

`(array)` 这个方法接受一个空数组。

[comment]: # ({/1f719bf4-66018290})

[comment]: # ({4fa8a419-b41637d2})
### Parameters

`(array)` The method accepts an empty array.

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

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

`(boolean)`如果用户已成功注销，则返回`true`。

[comment]: # ({/ec63e682-b5326b2b})

[comment]: # ({66018290-02f79c40})
### Return values

`(boolean)` Returns `true` if the user has been logged out successfully.

[comment]: # ({/66018290-02f79c40})

[comment]: # ({db3859ce-4cc4bf93})
### 示例

### Examples

#### 登出

#### Logging out

从API登出。

Log out from the API.

Request:

``` {.java}
{
    "jsonrpc": "2.0",
    "method": "user.logout",
    "params": [],
    "id": 1,
    "auth": "16a46baf181ef9602e1687f3110abf8a"
}
```

Response:

``` {.java}
{
    "jsonrpc": "2.0",
    "result": true,
    "id": 1
}
```

### 参考

-   [user.login](login)

### 来源

CUser::login() in
*frontends/php/include/classes/api/services/CUser.php*.

[comment]: # ({/db3859ce-4cc4bf93})
