From 43e577fa3e0b461da7253ee36b80e6cad1f6d082 Mon Sep 17 00:00:00 2001 From: lq Date: Wed, 4 Dec 2024 10:57:01 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=95=E7=82=B9=E7=99=BB=E5=BD=95=E6=B5=8B?= =?UTF-8?q?=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin/models/forms/LoginForm.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/models/forms/LoginForm.php b/admin/models/forms/LoginForm.php index 4cbc1ea..6b67dac 100644 --- a/admin/models/forms/LoginForm.php +++ b/admin/models/forms/LoginForm.php @@ -63,7 +63,7 @@ class LoginForm extends BaseModel { if ($this->validate()) { $adminAccessToken = new AdminAccessToken(); - $adminAccessToken->where('admin_id',$this->_user->uid)->save(['status' => -1, 'updated_at' => time()]); + $adminAccessToken->where('admin_id',$this->_user->uid)->andWhere('status',1)->save(['status' => -1, 'updated_at' => time()]); return $adminAccessToken->createToken($this->_user->uid,'admin'); } else { throw new Exception($this->getErrorMsg());