From ed4d91d87d9d5a57640efe5312be2b8e964c7e3a Mon Sep 17 00:00:00 2001 From: Anyon Date: Thu, 9 Apr 2020 10:20:18 +0800 Subject: [PATCH] Update Login.php --- app/admin/controller/Login.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/admin/controller/Login.php b/app/admin/controller/Login.php index 083e3eb3b..100afc5c1 100644 --- a/app/admin/controller/Login.php +++ b/app/admin/controller/Login.php @@ -76,6 +76,7 @@ class Login extends Controller if (empty($user['status'])) { $this->error('账号已经被禁用,请联系管理员!'); } + $this->app->session->set('user', $user); $this->app->session->delete("login_input_session_error"); $this->app->db->name('SystemUser')->where(['id' => $user['id']])->update([ 'login_ip' => $this->app->request->ip(), @@ -83,7 +84,6 @@ class Login extends Controller 'login_num' => $this->app->db->raw('login_num+1'), ]); sysoplog('用户登录', '登录系统后台成功'); - $this->app->session->set('user', $user); $this->success('登录成功', url('@admin')->build()); } }