aboutsummaryrefslogtreecommitdiff
path: root/routers/user/user.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/user/user.go')
-rw-r--r--routers/user/user.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/routers/user/user.go b/routers/user/user.go
index 2d6bcedc..d702f2b9 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
+ }
+}