login user auch fraktion und rang holen

This commit is contained in:
hydrant
2021-06-01 11:24:04 +00:00
parent 2b5d43cc3f
commit 083e07061d

View File

@@ -1,4 +1,4 @@
using System.Linq; using System.Linq;
using GTANetworkAPI; using GTANetworkAPI;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Newtonsoft.Json; using Newtonsoft.Json;
@@ -33,6 +33,8 @@ namespace ReallifeGamemode.Server.Events
using (var dbContext = new DatabaseContext()) using (var dbContext = new DatabaseContext())
{ {
var user = dbContext.Users var user = dbContext.Users
.Include(u => u.Faction)
.Include(u => u.FactionRank)
.Include(u => u.Group) .Include(u => u.Group)
.Include(u => u.BankAccount) .Include(u => u.BankAccount)
.SingleOrDefault(b => b.Name == username); .SingleOrDefault(b => b.Name == username);