From 0d18c65ee6ba0e52b06b1d7c76b8b487f66923ae Mon Sep 17 00:00:00 2001 From: lqmac Date: Wed, 1 Nov 2023 00:36:16 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=95=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/common/library/Auth.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/application/common/library/Auth.php b/application/common/library/Auth.php index 66c456a..a4fd79b 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); @@ -317,7 +318,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);