diff options
Diffstat (limited to 'modules/context/context.go')
-rw-r--r-- | modules/context/context.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/context/context.go b/modules/context/context.go index 6fc4c7261a..5a37f8b0bf 100644 --- a/modules/context/context.go +++ b/modules/context/context.go @@ -20,8 +20,8 @@ import ( "strings" "time" - "code.gitea.io/gitea/models" "code.gitea.io/gitea/models/unit" + user_model "code.gitea.io/gitea/models/user" "code.gitea.io/gitea/modules/base" mc "code.gitea.io/gitea/modules/cache" "code.gitea.io/gitea/modules/json" @@ -62,7 +62,7 @@ type Context struct { Link string // current request URL EscapedLink string - User *models.User + User *user_model.User IsSigned bool IsBasicAuth bool @@ -123,7 +123,7 @@ func (ctx *Context) IsUserRepoReaderAny() bool { // RedirectToUser redirect to a differently-named user func RedirectToUser(ctx *Context, userName string, redirectUserID int64) { - user, err := models.GetUserByID(redirectUserID) + user, err := user_model.GetUserByID(redirectUserID) if err != nil { ctx.ServerError("GetUserByID", err) return @@ -560,7 +560,7 @@ func GetContext(req *http.Request) *Context { } // GetContextUser returns context user -func GetContextUser(req *http.Request) *models.User { +func GetContextUser(req *http.Request) *user_model.User { if apiContext, ok := req.Context().Value(apiContextKey).(*APIContext); ok { return apiContext.User } |