From dd5e512c94285664c5c0a6e356a9e9639ba29936 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A6=99=E7=A0=81=E7=94=9F=E8=8A=B1?= <18523774412@qq.com> Date: Sun, 12 Jun 2022 12:07:08 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8D=E5=85=B3=E9=97=AD?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=91=98=E7=99=BB=E5=BD=95=E9=AA=8C=E8=AF=81?= =?UTF-8?q?=E7=A0=81=E5=90=8E=EF=BC=8C=E7=99=BB=E5=BD=95=E4=BB=BB=E7=84=B6?= =?UTF-8?q?=E6=8A=A5=E9=AA=8C=E8=AF=81=E7=A0=81=E4=B8=8D=E5=AD=98=E5=9C=A8?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/admin/controller/Index.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/admin/controller/Index.php b/app/admin/controller/Index.php index d105b797..f8dab9b6 100644 --- a/app/admin/controller/Index.php +++ b/app/admin/controller/Index.php @@ -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'));