mirror of
https://github.com/go-gitea/gitea.git
synced 2025-06-21 13:38:00 +02:00
Add active page
This commit is contained in:
@ -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
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user