mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
[更新]修复用户登录日期及次数显示处理
This commit is contained in:
parent
a354cc649b
commit
8c433686d5
@ -64,7 +64,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' => Db::raw('now()'), 'login_num' => Db::raw('login_num+1')];
|
||||
Db::name('SystemUser')->where(['id' => $user['id']])->update($data);
|
||||
session('user', $user);
|
||||
!empty($user['authorize']) && NodeService::applyAuthNode();
|
||||
|
@ -88,9 +88,7 @@
|
||||
<td class='text-left nowrap'>
|
||||
{$vo.mail|default="<span class='color-desc'>还没有设置邮箱</span>"|raw}
|
||||
</td>
|
||||
<td class='text-left nowrap'>
|
||||
{$vo.login_num|default="<span class='color-desc'>从未登录</span>"|raw}
|
||||
</td>
|
||||
<td class='text-left nowrap'>{$vo.login_num|default=0}</td>
|
||||
<td class='text-left nowrap'>
|
||||
{$vo.login_at|format_datetime|default="<span class='color-desc'>从未登录</span>"|raw}
|
||||
</td>
|
||||
|
Loading…
x
Reference in New Issue
Block a user