Browse Source

提交代码

tags/v1.22.7.1
ychao_1983 3 years ago
parent
commit
673172d0e8
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      modules/context/auth.go
  2. +1
    -1
      routers/home.go

+ 1
- 1
modules/context/auth.go View File

@@ -53,7 +53,7 @@ func Toggle(options *ToggleOptions) macaron.Handler {
ctx.Data["Title"] = ctx.Tr("auth.prohibit_login")
ctx.HTML(200, "user/auth/prohibit_login")
return
} else if ctx.User.IsActive && ctx.User.PhoneNumber == "" && ctx.Req.URL.Path != "/bindPhone" {
} else if setting.PhoneService.Enabled && ctx.User.IsActive && ctx.User.PhoneNumber == "" && ctx.Req.URL.Path != "/bindPhone" {
ctx.Data["Title"] = ctx.Tr("phone.bind_phone")
ctx.HTML(200, "user/auth/bind_phone")
return


+ 1
- 1
routers/home.go View File

@@ -117,7 +117,7 @@ func Dashboard(ctx *context.Context) {
ctx.Data["ChangePasscodeLink"] = setting.AppSubURL + "/user/change_password"
ctx.SetCookie("redirect_to", setting.AppSubURL+ctx.Req.URL.RequestURI(), 0, setting.AppSubURL)
ctx.Redirect(setting.AppSubURL + "/user/settings/change_password")
}else if ctx.User.IsActive && ctx.User.PhoneNumber == "" {
} else if setting.PhoneService.Enabled && ctx.User.IsActive && ctx.User.PhoneNumber == "" {
ctx.Data["Title"] = ctx.Tr("phone.bind_phone")
ctx.HTML(200, "user/auth/bind_phone")
return


Loading…
Cancel
Save