mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-05-25 02:56:55 +08:00
Finish new reset password, etc.
This commit is contained in:
@ -5,6 +5,7 @@
|
||||
package middleware
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net/url"
|
||||
"strings"
|
||||
|
||||
@ -43,6 +44,7 @@ func Toggle(options *ToggleOptions) macaron.Handler {
|
||||
}
|
||||
|
||||
if options.SignInRequire {
|
||||
fmt.Println(ctx.User.IsActive, setting.Service.RegisterEmailConfirm)
|
||||
if !ctx.IsSigned {
|
||||
// Ignore watch repository operation.
|
||||
if strings.HasSuffix(ctx.Req.RequestURI, "watch") {
|
||||
@ -52,7 +54,7 @@ func Toggle(options *ToggleOptions) macaron.Handler {
|
||||
ctx.Redirect("/user/login")
|
||||
return
|
||||
} else if !ctx.User.IsActive && setting.Service.RegisterEmailConfirm {
|
||||
// ctx.Data["Title"] = "Activate Your Account"
|
||||
ctx.Data["Title"] = ctx.Tr("auth.active_your_account")
|
||||
ctx.HTML(200, "user/activate")
|
||||
return
|
||||
}
|
||||
|
Reference in New Issue
Block a user