1
0
mirror of https://github.com/astaxie/beego.git synced 2025-07-12 08:01:01 +00:00

session destroy

This commit is contained in:
astaxie
2016-01-18 16:11:27 +08:00
parent 6e987bfdaf
commit fa8f6e5a53
4 changed files with 5 additions and 71 deletions

View File

@ -568,6 +568,7 @@ func (c *Controller) SessionRegenerateID() {
// DestroySession cleans session data and session cookie.
func (c *Controller) DestroySession() {
c.Ctx.Input.CruSession.Flush()
c.Ctx.Input.CruSession = nil
GlobalSessions.SessionDestroy(c.Ctx.ResponseWriter, c.Ctx.Request)
}