MCPcopy Create free account
hub / github.com/gogs/gogs / GetUserByID

Method GetUserByID

internal/context/auth.go:116–116  ·  view source on GitHub ↗

GetUserByID returns the user with given ID. It returns database.ErrUserNotExist when not found.

(ctx context.Context, id int64)

Source from the content-addressed store, hash-verified

114 // GetUserByID returns the user with given ID. It returns
115 // database.ErrUserNotExist when not found.
116 GetUserByID(ctx context.Context, id int64) (*database.User, error)
117 // GetUserByUsername returns the user with given username. It returns
118 // database.ErrUserNotExist when not found.
119 GetUserByUsername(ctx context.Context, username string) (*database.User, error)

Callers 3

authenticatedUserIDFunction · 0.65
authenticatedUserFunction · 0.65
AuthenticateByTokenFunction · 0.65

Implementers 4

storeinternal/context/store.go
MockStoreinternal/route/lfs/mocks_test.go
storeinternal/route/lfs/store.go
storeinternal/route/repo/store.go

Calls

no outgoing calls

Tested by

no test coverage detected