Always use lowercase username, as it is used for referential integrity. Fixes #352

This commit is contained in:
Deluan
2020-06-14 20:20:10 -04:00
parent 2d1d992e17
commit a6af46dbad
3 changed files with 5 additions and 4 deletions
+2 -2
View File
@@ -38,7 +38,7 @@ func (p *players) Register(ctx context.Context, id, client, typ, ip string) (*mo
if err != nil || id == "" {
plr, err = p.ds.Player(ctx).FindByName(client, userName)
if err == nil {
log.Debug("Found player by name", "id", plr.ID, "client", client, "userName", userName)
log.Debug("Found player by name", "id", plr.ID, "client", client, "username", userName)
} else {
r, _ := uuid.NewRandom()
plr = &model.Player{
@@ -47,7 +47,7 @@ func (p *players) Register(ctx context.Context, id, client, typ, ip string) (*mo
UserName: userName,
Client: client,
}
log.Info("Registering new player", "id", plr.ID, "client", client, "userName", userName)
log.Info("Registering new player", "id", plr.ID, "client", client, "username", userName)
}
}
plr.LastSeen = time.Now()