|
@@ -63,7 +63,6 @@ class Client extends Base
|
|
|
private function initPassport()
|
|
|
{
|
|
|
$this->passport = Dever::load('passport/lib/base');
|
|
|
- $this->uid = $this->passport->check(false);
|
|
|
}
|
|
|
|
|
|
private function initSave()
|
|
@@ -143,6 +142,10 @@ class Client extends Base
|
|
|
}
|
|
|
$id = Dever::id();
|
|
|
$this->session->add($this->prefix . 'oauth_id', $id);
|
|
|
+
|
|
|
+ $uid = $this->passport->check(false);
|
|
|
+ $this->session->add($this->prefix . 'oauth_uid', $uid);
|
|
|
+
|
|
|
$this->param('auth', 'appid', $this->config['appid']);
|
|
|
$this->param('auth', 'redirect_uri', Dever::url('request.callback?account=' . $this->account, 'oauth'));
|
|
|
$this->param('auth', 'state', $id);
|
|
@@ -302,7 +305,9 @@ class Client extends Base
|
|
|
$user['country'] = $userinfo['country'];
|
|
|
}
|
|
|
|
|
|
- $user = $this->passport->wechat($data, $user, $this->account, $this->system, $this->source_type, $this->system_source, $this->source, $this->invite, $this->uid);
|
|
|
+ $uid = $this->session->get($this->prefix . 'oauth_uid');
|
|
|
+
|
|
|
+ $user = $this->passport->wechat($data, $user, $this->account, $this->system, $this->source_type, $this->system_source, $this->source, $this->invite, $uid);
|
|
|
|
|
|
return $user;
|
|
|
}
|