Browse Source

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

Karson 4 years ago
parent
commit
fb2b5aed30
2 changed files with 16 additions and 2 deletions
  1. 8 0
      application/common/library/Auth.php
  2. 8 2
      composer.json

+ 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

+ 8 - 2
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"
+        }
+    ]
 }