Merge branch 'master' into develop

pull/291/head
F4NNIU 2021-03-14 20:20:52 +08:00
commit 2b5cab420a
1 changed files with 8 additions and 0 deletions

View File

@ -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初始化
*