Merge remote-tracking branch 'origin/develop' into develop

pull/294/head
Karson 2021-03-24 11:18:33 +08:00
commit fb2b5aed30
2 changed files with 16 additions and 2 deletions

View File

@ -70,6 +70,14 @@ class Auth
return $this->_user ? $this->_user->$name : null; return $this->_user ? $this->_user->$name : null;
} }
/**
* 兼容调用user模型的属性
*/
public function __isset($name)
{
return isset($this->_user) ? isset($this->_user->$name) : false;
}
/** /**
* 根据Token初始化 * 根据Token初始化
* *

View File

@ -16,7 +16,7 @@
], ],
"require": { "require": {
"php": ">=7.1.0", "php": ">=7.1.0",
"topthink/framework": "~5.0.24", "topthink/framework": "dev-master",
"topthink/think-captcha": "^1.0", "topthink/think-captcha": "^1.0",
"karsonzhang/fastadmin-addons": "~1.2.4", "karsonzhang/fastadmin-addons": "~1.2.4",
"overtrue/pinyin": "~3.0", "overtrue/pinyin": "~3.0",
@ -30,5 +30,11 @@
}, },
"config": { "config": {
"preferred-install": "dist" "preferred-install": "dist"
} },
"repositories": [
{
"type": "vcs",
"url": "https://gitee.com/karson/framework"
}
]
} }