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:
parent
a443a798e3
commit
076bd0b440
@ -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)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user