From 60ba2a872b9591c0c7d630ebb174b191157ae970 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:41:11 +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 6e1251932..759b658f0 100644 --- a/app/admin/controller/Login.php +++ b/app/admin/controller/Login.php @@ -86,10 +86,10 @@ class Login extends Controller } $this->app->session->set('user', $user->toArray()); $this->app->session->delete("LoginInputSessionError"); - $user->inc('login_num')->save([ - 'login_at' => date('Y-m-d H:i:s'), - 'login_ip' => $this->app->request->ip(), - ]); + $user->inc('login_num'); + $user['login_at'] = date('Y-m-d H:i:s'); + $user['login_ip'] = $this->app->request->ip(); + $user->save(); sysoplog('系统用户登录', '登录系统后台成功'); $this->success('登录成功', sysuri('admin/index/index')); }