From 4d1856e1933d2fe7d15124a416904d92bb764d46 Mon Sep 17 00:00:00 2001 From: songchenxuan Date: Tue, 3 Dec 2024 15:20:22 +0800 Subject: [PATCH] [misc] merge feedback #7861. --- module/user/zen.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/module/user/zen.php b/module/user/zen.php index 387318af8c..c057aeecea 100644 --- a/module/user/zen.php +++ b/module/user/zen.php @@ -155,7 +155,8 @@ class userZen extends user /* 验证账号和密码。*/ /* Verify account and password. */ - $user = $this->user->identify($account, $password, (int)$this->post->passwordStrength); + $passwordStrength = $viewType == 'json' ? 1 : (int)$this->post->passwordStrength; + $user = $this->user->identify($account, $password, $passwordStrength); /* 登录失败返回错误信息。*/ /* Return error message if login failed. */