|
@@ -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());
|
|
|
}
|
|
|
|
|
|
/**
|