aboutsummaryrefslogtreecommitdiffstats
path: root/routers/web/home.go
diff options
context:
space:
mode:
authorKN4CK3R <admin@oldschoolhack.me>2022-03-22 08:03:22 +0100
committerGitHub <noreply@github.com>2022-03-22 15:03:22 +0800
commit80fd25524e13dedbdc3527b32d008de152213a89 (patch)
tree63b2bfe4ffaf1dce12080cabdc2e845c8731a673 /routers/web/home.go
parent5495ba7660979973ba19e304786135da474e0e64 (diff)
downloadgitea-80fd25524e13dedbdc3527b32d008de152213a89.tar.gz
gitea-80fd25524e13dedbdc3527b32d008de152213a89.zip
Renamed ctx.User to ctx.Doer. (#19161)
Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Diffstat (limited to 'routers/web/home.go')
-rw-r--r--routers/web/home.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/routers/web/home.go b/routers/web/home.go
index ed81d84c7f..9036814ddf 100644
--- a/routers/web/home.go
+++ b/routers/web/home.go
@@ -25,14 +25,14 @@ const (
// Home render home page
func Home(ctx *context.Context) {
if ctx.IsSigned {
- if !ctx.User.IsActive && setting.Service.RegisterEmailConfirm {
+ if !ctx.Doer.IsActive && setting.Service.RegisterEmailConfirm {
ctx.Data["Title"] = ctx.Tr("auth.active_your_account")
ctx.HTML(http.StatusOK, auth.TplActivate)
- } else if !ctx.User.IsActive || ctx.User.ProhibitLogin {
- log.Info("Failed authentication attempt for %s from %s", ctx.User.Name, ctx.RemoteAddr())
+ } else if !ctx.Doer.IsActive || ctx.Doer.ProhibitLogin {
+ log.Info("Failed authentication attempt for %s from %s", ctx.Doer.Name, ctx.RemoteAddr())
ctx.Data["Title"] = ctx.Tr("auth.prohibit_login")
ctx.HTML(http.StatusOK, "user/auth/prohibit_login")
- } else if ctx.User.MustChangePassword {
+ } else if ctx.Doer.MustChangePassword {
ctx.Data["Title"] = ctx.Tr("auth.must_change_password")
ctx.Data["ChangePasscodeLink"] = setting.AppSubURL + "/user/change_password"
middleware.SetRedirectToCookie(ctx.Resp, setting.AppSubURL+ctx.Req.URL.RequestURI())