关于退出登陆

bigman
<?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();
    }

}

这样的退出登陆逻辑上没问题吧?

1850 2 0
2个回答

walkor

代码看起来没问题。不过我不熟悉你的业务逻辑,业务逻辑是否有问题要自己测试

  • 暂无评论
bigman

已经测试过了,没问题。多谢!

  • 暂无评论
年代过于久远,无法发表回答
🔝