formatted code
This commit is contained in:
@@ -25,7 +25,7 @@ namespace ReallifeGamemode.Server.Extensions
|
||||
public static User GetUser(this Client client, DatabaseContext context = null)
|
||||
{
|
||||
if (!client.IsLoggedIn()) return null;
|
||||
if(context == null)
|
||||
if (context == null)
|
||||
{
|
||||
using (context = new DatabaseContext())
|
||||
{
|
||||
@@ -33,7 +33,8 @@ namespace ReallifeGamemode.Server.Extensions
|
||||
.Users
|
||||
.Include(u => u.Faction)
|
||||
.Include(u => u.FactionRank)
|
||||
.FirstOrDefault(u => u.Name == client.Name);
|
||||
.Where(u => u.Name == client.Name)
|
||||
.FirstOrDefault();
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -42,7 +43,8 @@ namespace ReallifeGamemode.Server.Extensions
|
||||
.Users
|
||||
.Include(u => u.Faction)
|
||||
.Include(u => u.FactionRank)
|
||||
.FirstOrDefault(u => u.Name == client.Name);
|
||||
.Where(u => u.Name == client.Name)
|
||||
.FirstOrDefault();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user