This commit is contained in:
aozhiwei 2019-10-24 10:26:57 +08:00
parent f04143038a
commit 2cee273b56

View File

@ -308,6 +308,7 @@ class KefuController {
private function processText($msg, $accountid)
{
$this->createUser($accountid);
$openid = $msg['FromUserName'];
$CreateTime = $msg['CreateTime'];
//$text = $msg['Content'];
@ -373,6 +374,11 @@ class KefuController {
private function processEvent($msg, $accountid)
{
if ($msg['Event'] == 'user_enter_tempsession') {
$this->createUser($accountid);
}
}
private function createUser($accountid) {
$conn = $this->getMysql($accountid);
$ret = $conn->execScript('INSERT INTO accounts(accountid, channel, gameid, openid, awardtime, activetime) ' .
'SELECT :accountid, :channel, :gameid, :openid, :awardtime, :activetime ' .
@ -394,7 +400,6 @@ class KefuController {
));
}
}
}
private function getAccessToken($gameid)
{