From c61dd5910ec427796fcc40279d555d8d94f97de3 Mon Sep 17 00:00:00 2001 From: kanade Date: Mon, 24 Apr 2023 13:06:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/crm/controller/Callback.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/crm/controller/Callback.php b/application/crm/controller/Callback.php index ee2186f..4f13f20 100644 --- a/application/crm/controller/Callback.php +++ b/application/crm/controller/Callback.php @@ -126,7 +126,7 @@ class Callback extends Controller $code = Request::instance()->get('code'); $api = new Api(config('wework.corpId'), config('wework.corpSecret')); $userInfo = $api->getUserInfo($code); - if ($userInfo['userid']) { + if (isset($userInfo['userid']) && $userInfo['userid']) { Session::set('wxuser_id', $userInfo['userid']); $adminUser = db('admin_user')->where('wxwork_id', $userInfo['userid'])->find(); if ($adminUser) {