From f5719c2ee732de9ebc10285c2dcab60a3e181ac3 Mon Sep 17 00:00:00 2001 From: koogua Date: Fri, 15 Jul 2022 17:35:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E5=B8=90=E5=8F=B7=E9=94=81?= =?UTF-8?q?=E5=AE=9A=E5=90=8E=E8=BF=98=E8=83=BD=E7=99=BB=E5=BD=95=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Validators/Account.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Validators/Account.php b/app/Validators/Account.php index b8ed0f0e..004c8045 100644 --- a/app/Validators/Account.php +++ b/app/Validators/Account.php @@ -177,10 +177,10 @@ class Account extends Validator public function checkIfAllowLogin(UserModel $user) { - $locked = $user->locked == 1; - $expired = $user->lock_expiry_time > time(); + $case1 = $user->locked == 1; + $case2 = $user->lock_expiry_time > time(); - if ($locked && !$expired) { + if ($case1 && $case2) { throw new ForbiddenException('account.locked'); }