From 0ba41913f3d2244e781d4c8bfa9220e7d97cb285 Mon Sep 17 00:00:00 2001 From: v Date: Thu, 28 Aug 2025 23:11:22 +0800 Subject: [PATCH] up. ws update. --- app/controller/admin/auth/AuthController.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/app/controller/admin/auth/AuthController.php b/app/controller/admin/auth/AuthController.php index f34def9..ce79096 100644 --- a/app/controller/admin/auth/AuthController.php +++ b/app/controller/admin/auth/AuthController.php @@ -52,9 +52,15 @@ class AuthController extends BaseController 'client_name'=> $client->name, 'user_id' => $this->auth->userId, ])->find(); - if($clientModel) { - if($clientModel['lock_password'] !== $password) { - return $this->writeError('密码错误'); + if($clientModel && $clientModel['is_lock']) { + if (empty($clientModel['lock_password'])) { + if(!password_verify($password, $this->auth->getUser()->password)) { + return $this->writeError('密码错误'); + } + }else{ + if($clientModel['lock_password'] !== $password) { + return $this->writeError('密码错误'); + } } $clientModel->save(['is_lock'=>0,'lock_password'=>'','lock_time'=>null]); }