diff --git a/application/common/library/Auth.php b/application/common/library/Auth.php index 7d6f2d43..91a7e507 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初始化 * 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" + } + ] }