From da71f9625c515ea275b39e57ca860d939a3df047 Mon Sep 17 00:00:00 2001 From: "leo.lei" <346991581@qq.com> Date: Wed, 20 Dec 2017 11:55:15 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BF=AE=E5=A4=8Dtagid=5Flist=E4=B8=BA?= =?UTF-8?q?=E7=A9=BA=E6=97=B6=E6=8A=A5=E9=94=99=202.=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E6=9C=AA=E5=85=B3=E6=B3=A8=E5=85=AC=E4=BC=97=E5=8F=B7=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E6=89=93=E5=BC=80=E7=BD=91=E9=A1=B5=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extend/controller/BasicWechat.php | 2 ++ extend/service/WechatService.php | 2 ++ 2 files changed, 4 insertions(+) diff --git a/extend/controller/BasicWechat.php b/extend/controller/BasicWechat.php index b04d25fa6..48eddeac2 100644 --- a/extend/controller/BasicWechat.php +++ b/extend/controller/BasicWechat.php @@ -121,6 +121,8 @@ class BasicWechat extends Controller $user['expires_in'] = $result['expires_in'] + time() - 100; $user['refresh_token'] = $result['refresh_token']; $user['access_token'] = $result['access_token']; + // 用户特权信息不处理 + unset($user['privilege']); WechatService::setFansInfo($user, $wechat->appid) or $this->error('微信网页授权用户保存失败!'); } $this->redirect($redirect_url); diff --git a/extend/service/WechatService.php b/extend/service/WechatService.php index 5bf0c8e7c..3ec827369 100644 --- a/extend/service/WechatService.php +++ b/extend/service/WechatService.php @@ -158,6 +158,8 @@ class WechatService } if (!empty($user['tagid_list']) && is_array($user['tagid_list'])) { $user['tagid_list'] = join(',', $user['tagid_list']); + }else{ + unset($user['tagid_list']); } foreach (['country', 'province', 'city', 'nickname', 'remark'] as $k) { isset($user[$k]) && $user[$k] = ToolsService::emojiEncode($user[$k]);