From 172fa400dce8f7de0b7d87284034a9de15240cec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E6=99=AF=E7=AB=8B?= Date: Sat, 14 May 2022 19:48:45 +0800 Subject: [PATCH] Update Login.php --- app/admin/controller/Login.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/admin/controller/Login.php b/app/admin/controller/Login.php index 83a1bf7eb..4850f6d5e 100644 --- a/app/admin/controller/Login.php +++ b/app/admin/controller/Login.php @@ -81,19 +81,19 @@ class Login extends Controller $map = ['username' => $data['username'], 'is_deleted' => 0]; $user = SystemUser::mk()->where($map)->findOrEmpty(); if ($user->isEmpty()) { - $this->app->session->set("LoginInputSessionError", true); + $this->app->session->set('LoginInputSessionError', true); $this->error('登录账号或密码错误,请重新输入!'); } if (empty($user['status'])) { - $this->app->session->set("LoginInputSessionError", true); + $this->app->session->set('LoginInputSessionError', true); $this->error('账号已经被禁用,请联系管理员!'); } if (md5("{$user['password']}{$data['uniqid']}") !== $data['password']) { - $this->app->session->set("LoginInputSessionError", true); + $this->app->session->set('LoginInputSessionError', true); $this->error('登录账号或密码错误,请重新输入!'); } $this->app->session->set('user', $user->toArray()); - $this->app->session->delete("LoginInputSessionError"); + $this->app->session->delete('LoginInputSessionError'); $user->inc('login_num')->update([ 'login_at' => date('Y-m-d H:i:s'), 'login_ip' => $this->app->request->ip(),