|
@@ -26,7 +26,7 @@ class Auth
|
|
|
//默认配置
|
|
|
protected $config = [];
|
|
|
protected $options = [];
|
|
|
- protected $allowFields = ['id', 'username', 'mobile', 'avatar'];
|
|
|
+ protected $allowFields = ['id', 'username', 'mobile', 'avatar', 'email', 'firstname', 'lastname'];
|
|
|
|
|
|
public function __construct($options = [])
|
|
|
{
|
|
@@ -174,7 +174,7 @@ class Auth
|
|
|
'email' => $email,
|
|
|
'mobile' => $mobile,
|
|
|
'nickname' => $this->get_rand_nick_name(),
|
|
|
- 'avatar' => '/assets/img/avatar.png',
|
|
|
+ 'avatar' => config('site.default_avatar'),
|
|
|
];
|
|
|
$params = array_merge($data, [
|
|
|
'salt' => Random::alnum(),
|
|
@@ -406,7 +406,7 @@ class Auth
|
|
|
$userinfo = array_merge($userinfo, Token::get($this->_token));
|
|
|
|
|
|
//追加
|
|
|
- $userinfo['avatar'] = one_domain_image($userinfo['avatar']);
|
|
|
+ $userinfo['avatar'] = localpath_to_netpath($userinfo['avatar']);
|
|
|
$userinfo['role_type'] = 'user';//角色:用户
|
|
|
|
|
|
return $userinfo;
|