From 076bd0b440cbec46ade71e90de53c80470a2fb22 Mon Sep 17 00:00:00 2001 From: astaxie Date: Tue, 5 Nov 2013 22:07:09 +0800 Subject: [PATCH] #254 add controller func SessionRegenerateID --- controller.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/controller.go b/controller.go index a4ce22fb..f0141f35 100644 --- a/controller.go +++ b/controller.go @@ -298,6 +298,11 @@ func (c *Controller) DelSession(name interface{}) { 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() { GlobalSessions.SessionDestroy(c.Ctx.ResponseWriter, c.Ctx.Request) }