|
|
@ -182,7 +182,8 @@ class Auth |
|
|
|
$user = User::create($params, true); |
|
|
|
$user = User::create($params, true); |
|
|
|
|
|
|
|
|
|
|
|
$this->_user = User::get($user->id); |
|
|
|
$this->_user = User::get($user->id); |
|
|
|
|
|
|
|
//清除之前所有的Token |
|
|
|
|
|
|
|
Token::clear($user->id); |
|
|
|
//设置Token |
|
|
|
//设置Token |
|
|
|
$this->_token = Random::uuid(); |
|
|
|
$this->_token = Random::uuid(); |
|
|
|
Token::set($this->_token, $user->id, $this->keeptime); |
|
|
|
Token::set($this->_token, $user->id, $this->keeptime); |
|
|
@ -317,7 +318,8 @@ class Auth |
|
|
|
$user->save(); |
|
|
|
$user->save(); |
|
|
|
|
|
|
|
|
|
|
|
$this->_user = $user; |
|
|
|
$this->_user = $user; |
|
|
|
|
|
|
|
//清除之前所有的Token |
|
|
|
|
|
|
|
Token::clear($user->id); |
|
|
|
$this->_token = Random::uuid(); |
|
|
|
$this->_token = Random::uuid(); |
|
|
|
Token::set($this->_token, $user->id, $this->keeptime); |
|
|
|
Token::set($this->_token, $user->id, $this->keeptime); |
|
|
|
|
|
|
|
|
|
|
|