mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
[更新]修正已删除登录处理 #111
This commit is contained in:
parent
e1fbadddc4
commit
43e8ccbbe1
@ -62,6 +62,7 @@ class Login extends BasicAdmin
|
|||||||
$user = Db::name('SystemUser')->where('username', $username)->find();
|
$user = Db::name('SystemUser')->where('username', $username)->find();
|
||||||
empty($user) && $this->error('登录账号不存在,请重新输入!');
|
empty($user) && $this->error('登录账号不存在,请重新输入!');
|
||||||
($user['password'] !== md5($password)) && $this->error('登录密码与账号不匹配,请重新输入!');
|
($user['password'] !== md5($password)) && $this->error('登录密码与账号不匹配,请重新输入!');
|
||||||
|
empty($user['is_deleted']) || $this->error('账号已经被删除,请联系管理!');
|
||||||
empty($user['status']) && $this->error('账号已经被禁用,请联系管理!');
|
empty($user['status']) && $this->error('账号已经被禁用,请联系管理!');
|
||||||
// 更新登录信息
|
// 更新登录信息
|
||||||
$data = ['login_at' => Db::raw('now()'), 'login_num' => Db::raw('login_num+1')];
|
$data = ['login_at' => Db::raw('now()'), 'login_num' => Db::raw('login_num+1')];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user