Browse Source

Merge branch 'master' into develop

F4NNIU 4 years ago
parent
commit
2b5cab420a
1 changed files with 8 additions and 0 deletions
  1. 8 0
      application/common/library/Auth.php

+ 8 - 0
application/common/library/Auth.php

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