# Gateway::unbindUid
## 說明:
~~~
void Gateway::unbindUid(string $client_id, mixed $uid);
~~~
將client_id與uid解綁。
## 注意:
當client_id下線(連接斷開)時會自動與uid解綁,開發者無需在onClose事件調用Gateway::unbindUid。
## 參數
* $client_id
客戶端的client_id
* $uid
數字或者字符串。
## 返回值
無返回值
## 范例
~~~
use \GatewayWorker\Lib\Gateway;
class Events
{
...
public static function onMessage($client_id, $message)
{
// $message = '{"type":"logout","uid":"xxxxx"}'
$req_data = json_decode($message, true);
Gateway::unbindUid($client_id, $req_data['uid']);
}
...
}
~~~
- 快速入門
- 魔際客服系統V1.0簡介
- 新手上路
- 注冊并創建應用
- 通信過程及聊天記錄保存
- 實時消息回調
- Lib/Geteway類提供的接口
- sendToAll
- sendToClient
- closeClient
- isOnline
- bindUid
- unbindUid
- isUidOnline
- getClientIdByUid
- getUidByClientId
- sendToUid
- joinGroup
- leaveGroup
- sendToGroup
- getClientCountByGroup
- getClientSessionsByGroup
- getAllClientCount
- getAllClientSessions
- setSession
- updateSession
- getSession
- 服務端集成
- 入門
- 用戶體系集成
- 聊天記錄
- 文件上傳下載
- 發送消息
- 群組管理
- 聊天室管理
- 應用管理
- Web IM集成
- Web IM 介紹
- 集成方式
- Web SDK基礎功能
- 消息
- 好友管理
- 群組管理
- 聊天室管理
- 微信小程序 Demo
- Web SDK API Doc
- Web IM SDK 更新日志
- React Native集成
- React Native Demo 介紹