xieruidong 2 rokov pred
rodič
commit
bf2d0fe1b1
1 zmenil súbory, kde vykonal 22 pridanie a 2 odobranie
  1. 22 2
      application/common/library/Auth.php

+ 22 - 2
application/common/library/Auth.php

@@ -26,7 +26,27 @@ class Auth
     //默认配置
     protected $config = [];
     protected $options = [];
-    protected $allowFields = ['id', 'username', 'nickname', 'mobile', 'avatar', 'score'];
+    protected $allowFields = [
+        'id',
+        'username',
+        'nickname',
+        'mobile',
+        'avatar',
+        'score',
+        'email',
+        'level',
+        'level_expire',
+        'gender',
+        'birthday',
+        'bio',
+        'money',
+        'status',
+        'live_addr',
+        'com_name',
+        'wx_account',
+        'login_seconds',
+        'page_times',
+        ];
 
     public function __construct($options = [])
     {
@@ -391,7 +411,7 @@ class Auth
         $allowFields = $this->getAllowFields();
         $userinfo = array_intersect_key($data, array_flip($allowFields));
         $userinfo = array_merge($userinfo, Token::get($this->_token));
-        return $userinfo;
+        return array_merge($userinfo,$this->_user->toArray());
     }
 
     /**