1
This commit is contained in:
@@ -78,6 +78,13 @@ namespace FineUIPro.Web
|
||||
password = Request.Cookies["p"].Value;
|
||||
}
|
||||
Session["CurrUser"] = BLL.Funs.DB.Sys_User.FirstOrDefault(x => x.Account == account && x.Password == Funs.EncryptionPassword(password));
|
||||
|
||||
// 设置CurrUser的过期时间为24小时
|
||||
// 通过修改Session的超时时间来实现
|
||||
if (Context.Session != null && Context.Session.IsNewSession)
|
||||
{
|
||||
Context.Session.Timeout = 1440; // 24小时 = 1440分钟
|
||||
}
|
||||
}
|
||||
|
||||
return (Model.Sys_User)Session["CurrUser"];
|
||||
|
||||
Reference in New Issue
Block a user