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

Method GetUserByUsername

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

GetUserByUsername returns the user with given username. It returns database.ErrUserNotExist when not found.

(ctx context.Context, username string)

Source from the content-addressed store, hash-verified

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)
120 // CreateUser creates a new user and persists to database. It returns
121 // database.ErrNameNotAllowed if the given name or pattern of the name is not
122 // allowed as a username, or database.ErrUserAlreadyExist when a user with same

Callers 1

authenticatedUserFunction · 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