|
|
@@ -241,6 +241,7 @@ class Events
|
|
|
public static function kfzdclose($client_id, $datas)
|
|
|
{
|
|
|
Gateway::closeClient($client_id);
|
|
|
+ $_SESSION['kfzdclose'] = 1;
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
@@ -743,8 +744,7 @@ class Events
|
|
|
}
|
|
|
|
|
|
//客服登陆验证
|
|
|
- public
|
|
|
- static function KfloginCheck($client, $messageArray)
|
|
|
+ public static function KfloginCheck($client, $messageArray)
|
|
|
{
|
|
|
$uid = isset($messageArray['uid']) ? $messageArray['uid'] : '';
|
|
|
$token = isset($messageArray['token']) ? $messageArray['token'] : '';
|
|
|
@@ -941,7 +941,9 @@ class Events
|
|
|
echo date("Y-m-d H:i:s") . ' - ' . "客服发生异常退出." . print_r([$client_id, $uid, $group, $uinfo], true) . "\n";
|
|
|
return;
|
|
|
}
|
|
|
- self::$db->update('ws_users')->cols(['token' => uniqid()])->where('id=' . self::getkfid($uid))->query();
|
|
|
+ if (isset($_SESSION['kfzdclose']) && $_SESSION['kfzdclose']==1 ){
|
|
|
+ self::$db->update('ws_users')->cols(['token' => uniqid()])->where('id=' . self::getkfid($uid))->query();
|
|
|
+ }
|
|
|
|
|
|
$user_info = self::$redis->hgetall(self::getKfServiceKey($uid));
|
|
|
if (!empty($user_info)) {
|