From 83ae12748013211383e1f9fb9341956e4836cc18 Mon Sep 17 00:00:00 2001 From: Caiqy Date: Fri, 10 Jul 2020 18:26:07 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E8=A1=A5=E5=85=85Auth=E5=85=BC=E5=AE=B9?= =?UTF-8?q?=E8=B0=83=E7=94=A8user=E6=A8=A1=E5=9E=8B=E7=9A=84=E5=B1=9E?= =?UTF-8?q?=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/common/library/Auth.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/application/common/library/Auth.php b/application/common/library/Auth.php index 4356bac2..53138518 100644 --- a/application/common/library/Auth.php +++ b/application/common/library/Auth.php @@ -70,6 +70,14 @@ class Auth return $this->_user ? $this->_user->$name : null; } + /** + * 兼容调用user模型的属性 + */ + public function __isset($name) + { + return isset($this->_user) ? isset($this->_user->$name) : false; + } + /** * 根据Token初始化 * From 2e74e2c119d632cd087867ef492a58778f07d2fb Mon Sep 17 00:00:00 2001 From: F4NNIU Date: Thu, 18 Mar 2021 15:33:18 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20Composer=20=E4=BE=9D?= =?UTF-8?q?=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- composer.json | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 73eef9c1..1de5b560 100755 --- a/composer.json +++ b/composer.json @@ -16,7 +16,7 @@ ], "require": { "php": ">=7.1.0", - "topthink/framework": "~5.0.24", + "topthink/framework": "dev-master", "topthink/think-captcha": "^1.0", "karsonzhang/fastadmin-addons": "~1.2.4", "overtrue/pinyin": "~3.0", @@ -30,5 +30,11 @@ }, "config": { "preferred-install": "dist" - } + }, + "repositories": [ + { + "type": "vcs", + "url": "https://gitee.com/karson/framework" + } + ] }