up. ws update.

This commit is contained in:
扶桑花间 2025-08-28 23:11:22 +08:00
parent 5682d05f9f
commit 0ba41913f3

View File

@ -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]);
}