mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
[更新]简化代码,优化结构
This commit is contained in:
parent
80d634d881
commit
4f70cf2527
@ -56,7 +56,7 @@ class Login extends BasicAdmin {
|
||||
Db::name('SystemUser')->where('id', $user['id'])->update(['login_at' => ['exp', 'now()'], 'login_num' => ['exp', 'login_num+1']]);
|
||||
session('user', $user);
|
||||
!empty($user['authorize']) && NodeModel::applyAuthNode();
|
||||
LogService::write('登录系统', '用户登录系统成功!');
|
||||
LogService::write('系统管理', '用户登录系统成功');
|
||||
$this->success('登录成功,正在进入系统...', '@admin');
|
||||
}
|
||||
}
|
||||
@ -65,7 +65,7 @@ class Login extends BasicAdmin {
|
||||
* 退出登录
|
||||
*/
|
||||
public function out() {
|
||||
LogService::write('退出系统', '用户退出系统成功!');
|
||||
LogService::write('系统管理', '用户退出系统成功');
|
||||
session('user', null);
|
||||
session_destroy();
|
||||
$this->success('退出登录成功!', '@admin/login');
|
||||
|
Loading…
x
Reference in New Issue
Block a user