Commit 8d2341aa authored by hujun's avatar hujun

登录过期时间处理

parent ef160276
......@@ -188,9 +188,12 @@ class Basic extends Controller
if(empty($this->userName) || empty($this->userId) || empty($this->lastLoginTime) ){
$this->redirect('/index/login');
}
//登录有效期为1小时
//登录有效期为2小时
if ((time() - $this->lastLoginTime) > 7200) {
$this->redirect('/index/login');
} else {
//更新时间
Session::set("lastLoginTime",time());
}
return ;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment