<?php
namespace control\user;
use control\common\userCommon;
use GatewayWorker\Lib\Gateway;
class logout extends userCommon
{
public function main()
{
$sess = $this->getSession();
$this->setSession(array());
if (Gateway::isOnline($this->clientId) && isset($sess)) {
Gateway::unbindUid($this->clientId, $sess);
}
$this->outPut();
}
}
這樣的退出登陸邏輯上沒問題吧?