MCPcopy Create free account
hub / github.com/GoMudEngine/GoMud / SaveAllUsers

Function SaveAllUsers

internal/users/users.go:359–373  ·  view source on GitHub ↗
(isAutoSave ...bool)

Source from the content-addressed store, hash-verified

357}
358
359func SaveAllUsers(isAutoSave ...bool) {
360 userManagerMu.RLock()
361 users := make([]*UserRecord, 0, len(userManager.Users))
362 for _, u := range userManager.Users {
363 users = append(users, u)
364 }
365 userManagerMu.RUnlock()
366
367 for _, u := range users {
368 if err := SaveUser(*u, isAutoSave...); err != nil {
369 mudlog.Error("SaveAllUsers()", "error", err.Error())
370 }
371 }
372
373}
374
375func LogOutUserByConnectionId(connectionId connections.ConnectionId) error {
376

Callers 4

triggerCopyoverFunction · 0.92
MainWorkerMethod · 0.92
saveAllDataFunction · 0.92
AutoSaveFunction · 0.92

Calls 2

ErrorFunction · 0.92
SaveUserFunction · 0.85

Tested by

no test coverage detected