login logout logs
This commit is contained in:
@@ -6,6 +6,7 @@ using ReallifeGamemode.Database.Models;
|
||||
using ReallifeGamemode.Server.Extensions;
|
||||
using ReallifeGamemode.Server.Util;
|
||||
using System;
|
||||
using ReallifeGamemode.Database.Entities.Logs;
|
||||
|
||||
/**
|
||||
* @overview Life of German Reallife - Event Register (Register.cs)
|
||||
@@ -51,7 +52,20 @@ namespace ReallifeGamemode.Server.Events
|
||||
}
|
||||
};
|
||||
|
||||
var logEntry = new LoginLogoutLogEntry()
|
||||
{
|
||||
IpAddress = player.Address,
|
||||
User = user,
|
||||
PlayerId = player.Handle.Value,
|
||||
SocialClubName = player.SocialClubName,
|
||||
Username = player.Name,
|
||||
LoginLogout = true,
|
||||
Time = DateTime.Now
|
||||
};
|
||||
|
||||
dbContext.Users.Add(user);
|
||||
dbContext.LoginLogoutLogs.Add(logEntry);
|
||||
|
||||
dbContext.SaveChanges();
|
||||
|
||||
player.SetData("dbId", user.Id);
|
||||
|
||||
Reference in New Issue
Block a user