From bd86dca878fb9eaf12ca93b54c5c2fb8a2ecb785 Mon Sep 17 00:00:00 2001 From: liumengyi Date: Tue, 31 Jan 2023 16:31:51 +0800 Subject: [PATCH] * Fix bug for empty password. --- module/user/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/user/model.php b/module/user/model.php index 48cc74befe..eea5c31733 100644 --- a/module/user/model.php +++ b/module/user/model.php @@ -862,7 +862,7 @@ class userModel extends model $_POST['password1'] = trim($_POST['password1']); $_POST['password2'] = trim($_POST['password2']); if(!$canNoPassword and empty($_POST['password1'])) dao::$errors['password1'][] = sprintf($this->lang->error->notempty, $this->lang->user->password) . '
'; - if(!$canNoPassword and $this->post->password1 != false) + if(!empty($_POST['password1'])) { if(isset($this->config->safe->mode) and ($this->post->passwordStrength < $this->config->safe->mode)) dao::$errors['password1'][] = zget($this->lang->user->placeholder->passwordStrengthCheck, $this->config->safe->mode, $this->lang->user->weakPassword) . '
';