From 2e6a9c2f6091479a7cb4b6ba04ba4eb647256750 Mon Sep 17 00:00:00 2001 From: "PS2021QWPJFCZC\\Admin" <464401240@qq.com> Date: Tue, 10 May 2022 17:20:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D\application\common\library\A?= =?UTF-8?q?uth.php=E4=B8=AD$this->=5Fuser=E4=B8=BA=E7=A9=BA=E6=97=B6?= =?UTF-8?q?=E5=87=BA=E7=8E=B0=E7=9A=84=E8=87=B4=E5=91=BD=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/common/library/Auth.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/application/common/library/Auth.php b/application/common/library/Auth.php index 38a19a061..ba9dbe1c9 100644 --- a/application/common/library/Auth.php +++ b/application/common/library/Auth.php @@ -385,6 +385,9 @@ class Auth */ public function getUserinfo() { + if (empty($this->_user)) { + return []; + } $data = $this->_user->toArray(); $allowFields = $this->getAllowFields(); $userinfo = array_intersect_key($data, array_flip($allowFields)); -- Gitee