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

Function NewGhostUser

internal/database/users.go:1459–1465  ·  view source on GitHub ↗

NewGhostUser creates and returns a fake user for people who has deleted their accounts. TODO: Once migrated to unknwon.dev/i18n, pass in the `i18n.Locale` to translate the text to local language.

()

Source from the content-addressed store, hash-verified

1457// TODO: Once migrated to unknwon.dev/i18n, pass in the `i18n.Locale` to
1458// translate the text to local language.
1459func NewGhostUser() *User {
1460 return &User{
1461 ID: -1,
1462 Name: "Ghost",
1463 LowerName: "ghost",
1464 }
1465}
1466
1467var (
1468 reservedUsernames = map[string]struct{}{

Callers 5

TestWebhookFunction · 0.92
loadAttributesMethod · 0.85
loadAttributesMethod · 0.85
loadAttributesMethod · 0.85
loadAttributesMethod · 0.85

Calls

no outgoing calls

Tested by 1

TestWebhookFunction · 0.74