diff --git a/app/user/controller/IndexController.php b/app/user/controller/IndexController.php index 32a526e..ccff73c 100644 --- a/app/user/controller/IndexController.php +++ b/app/user/controller/IndexController.php @@ -37,7 +37,7 @@ class IndexController extends HomeBaseController ->where('app_id', $appId) ->find(); if ($findThirdPartyUser) { - $this->wechatUserLogin($findThirdPartyUser,$openid,$appId); + $this->wechatUserLogin($wechat_user,$findThirdPartyUser,$openid,$appId); }else{ $this->wechatUserRegister($wechat_user,$openid,$appId); } @@ -57,14 +57,15 @@ class IndexController extends HomeBaseController * @param $openid * @param $appId */ - protected function wechatUserLogin($findThirdPartyUser,$openid,$appId){ + protected function wechatUserLogin($wechat_user,$findThirdPartyUser,$openid,$appId){ $currentTime = time(); $ip = $this->request->ip(0, true); $token = cmf_generate_user_token($findThirdPartyUser['user_id'], 'public'); $userData = [ 'last_login_ip' => $ip, 'last_login_time' => $currentTime, - 'login_times' => ['exp', 'login_times+1'] + 'login_times' => ['exp', 'login_times+1'], + 'user_nickname' => $wechat_user['nickname'] ]; $row1=Db::name("third_party_user") ->where('openid', $openid)