From a2fbb246151ce722a30d932dd73a9ecc76b020e9 Mon Sep 17 00:00:00 2001 From: Unknown Date: Wed, 19 Mar 2014 09:24:02 -0400 Subject: Add active page --- routers/user/user.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'routers') diff --git a/routers/user/user.go b/routers/user/user.go index 2d6bcedce5..d702f2b956 100644 --- a/routers/user/user.go +++ b/routers/user/user.go @@ -99,6 +99,7 @@ func SignIn(ctx *middleware.Context, form auth.LogInForm) { ctx.Session.Set("userId", user.Id) ctx.Session.Set("userName", user.Name) + ctx.Render.Redirect("/") } @@ -223,3 +224,18 @@ func Pulls(ctx *middleware.Context) { func Stars(ctx *middleware.Context) { ctx.Render.HTML(200, "user/stars", ctx.Data) } + +func Activate(ctx *middleware.Context) { + code := ctx.Query("code") + if len(code) == 0 { + ctx.Data["IsActivatePage"] = true + // Resend confirmation e-mail. + if base.Service.RegisterEmailConfirm { + auth.SendRegisterMail(ctx.User) + } else { + ctx.Data["ServiceNotEnabled"] = true + } + ctx.Render.HTML(200, "user/active", ctx.Data) + return + } +} -- cgit v1.2.3