fix:修复关闭管理员登录验证码后,登录任然报验证码不存在的问题

This commit is contained in:
妙码生花 2022-06-12 12:07:08 +08:00
parent fa4ac3f890
commit dd5e512c94

View File

@ -75,9 +75,11 @@ class Index extends Backend
$this->error($validate->getError());
}
$captchaObj = new Captcha();
if (!$captchaObj->check($data['captcha'], $data['captchaId'])) {
$this->error(__('Please enter the correct verification code'));
if ($captchaSwitch) {
$captchaObj = new Captcha();
if (!$captchaObj->check($data['captcha'], $data['captchaId'])) {
$this->error(__('Please enter the correct verification code'));
}
}
AdminLog::setTitle(__('Login'));