Update Login.php

This commit is contained in:
邹景立 2022-01-21 19:41:11 +08:00
parent e98bfc8b34
commit 60ba2a872b

View File

@ -86,10 +86,10 @@ class Login extends Controller
} }
$this->app->session->set('user', $user->toArray()); $this->app->session->set('user', $user->toArray());
$this->app->session->delete("LoginInputSessionError"); $this->app->session->delete("LoginInputSessionError");
$user->inc('login_num')->save([ $user->inc('login_num');
'login_at' => date('Y-m-d H:i:s'), $user['login_at'] = date('Y-m-d H:i:s');
'login_ip' => $this->app->request->ip(), $user['login_ip'] = $this->app->request->ip();
]); $user->save();
sysoplog('系统用户登录', '登录系统后台成功'); sysoplog('系统用户登录', '登录系统后台成功');
$this->success('登录成功', sysuri('admin/index/index')); $this->success('登录成功', sysuri('admin/index/index'));
} }