Update Login.php

This commit is contained in:
Anyon 2019-04-04 13:37:38 +08:00
parent c83f606da5
commit 623d960a4d

View File

@ -59,7 +59,7 @@ class Login extends BasicAdmin
($user['password'] !== md5($password)) && $this->error('登录密码与账号不匹配,请重新输入!');
empty($user['status']) && $this->error('账号已经被禁用,请联系管理!');
// 更新登录信息
$data = ['login_at' => ['exp', 'now()'], 'login_num' => ['exp', 'login_num+1']];
$data = ['login_at' => date('Y-m-d H:i:s'), 'login_num' => $user['login_num'] + 1];
Db::name('SystemUser')->where(['id' => $user['id']])->update($data);
session('user', $user);
!empty($user['authorize']) && NodeService::applyAuthNode();