From c8ebe352299b32504512561004e26ee3d0677b8a Mon Sep 17 00:00:00 2001 From: lqmac Date: Tue, 31 Oct 2023 23:28:51 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=95=E7=82=B9=E7=99=BB=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/common/library/Auth.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/application/common/library/Auth.php b/application/common/library/Auth.php index 7a7ddb1..7c7926c 100755 --- a/application/common/library/Auth.php +++ b/application/common/library/Auth.php @@ -182,7 +182,8 @@ class Auth $user = User::create($params, true); $this->_user = User::get($user->id); - + //清除之前所有的Token + Token::clear($user->id); //设置Token $this->_token = Random::uuid(); Token::set($this->_token, $user->id, $this->keeptime); @@ -200,7 +201,6 @@ class Auth } return true; } - /** * 用户登录 * @@ -317,7 +317,8 @@ class Auth $user->save(); $this->_user = $user; - + //清除之前所有的Token + Token::clear($user->id); $this->_token = Random::uuid(); Token::set($this->_token, $user->id, $this->keeptime);