user.logout

说明

string/object user.logout(array)

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

Description

string/object user.logout(array)

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

参数

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

Parameters

(array) The method accepts an empty array.

返回值

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

Return values

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

示例

Examples

登出

Logging out

从API登出。

Log out from the API.

Request:

  1. {
  2. "jsonrpc": "2.0",
  3. "method": "user.logout",
  4. "params": [],
  5. "id": 1,
  6. "auth": "16a46baf181ef9602e1687f3110abf8a"
  7. }

Response:

  1. {
  2. "jsonrpc": "2.0",
  3. "result": true,
  4. "id": 1
  5. }

参考

来源

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