MCPcopy Create free account
hub / github.com/OpenListTeam/OpenList / DelUserCache

Function DelUserCache

internal/op/user.go:117–130  ·  view source on GitHub ↗
(username string)

Source from the content-addressed store, hash-verified

115}
116
117func DelUserCache(username string) error {
118 user, err := GetUserByName(username)
119 if err != nil {
120 return err
121 }
122 if user.IsAdmin() {
123 adminUser = nil
124 }
125 if user.IsGuest() {
126 guestUser = nil
127 }
128 Cache.DeleteUser(username)
129 return nil
130}

Callers 3

DelUserCacheFunction · 0.92
FinishAuthnRegistrationFunction · 0.92
DeleteAuthnLoginFunction · 0.92

Calls 4

IsAdminMethod · 0.80
IsGuestMethod · 0.80
DeleteUserMethod · 0.80
GetUserByNameFunction · 0.70

Tested by

no test coverage detected