1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-22 17:21:02 +00:00

#254 add controller func SessionRegenerateID

This commit is contained in:
astaxie 2013-11-05 22:07:09 +08:00
parent a443a798e3
commit 076bd0b440

View File

@ -298,6 +298,11 @@ func (c *Controller) DelSession(name interface{}) {
c.CruSession.Delete(name) c.CruSession.Delete(name)
} }
func (c *Controller) SessionRegenerateID() {
c.CruSession = GlobalSessions.SessionRegenerateId(c.Ctx.ResponseWriter, c.Ctx.Request)
c.Ctx.Input.CruSession = c.CruSession
}
func (c *Controller) DestroySession() { func (c *Controller) DestroySession() {
GlobalSessions.SessionDestroy(c.Ctx.ResponseWriter, c.Ctx.Request) GlobalSessions.SessionDestroy(c.Ctx.ResponseWriter, c.Ctx.Request)
} }