From 558dede7ce11cf7519fddb7cf9a3d9b3ad25797f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E6=99=AF=E7=AB=8B?= Date: Fri, 21 Jan 2022 19:59:10 +0800 Subject: [PATCH] Update Login.php --- app/admin/controller/Login.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/admin/controller/Login.php b/app/admin/controller/Login.php index 759b658f0..16db22c66 100644 --- a/app/admin/controller/Login.php +++ b/app/admin/controller/Login.php @@ -86,10 +86,9 @@ class Login extends Controller } $this->app->session->set('user', $user->toArray()); $this->app->session->delete("LoginInputSessionError"); - $user->inc('login_num'); $user['login_at'] = date('Y-m-d H:i:s'); $user['login_ip'] = $this->app->request->ip(); - $user->save(); + $user->inc('login_num')->save(); sysoplog('系统用户登录', '登录系统后台成功'); $this->success('登录成功', sysuri('admin/index/index')); }