mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-07-28 07:58:40 +00:00
Implement checking for the Patchwork user agent, move logout into standalone method
This commit is contained in:
parent
df7ebf977a
commit
68dbf50253
7 changed files with 72 additions and 8 deletions
|
@ -214,7 +214,11 @@ public class LoginController : ControllerBase
|
|||
|
||||
Logger.Success($"Successfully logged in user {user.Username} as {token.GameVersion} client", LogArea.Login);
|
||||
|
||||
user.LastLogin = TimeHelper.TimestampMillis;
|
||||
string userAgent = this.Request.Headers.UserAgent.ToString();
|
||||
if (!String.IsNullOrWhiteSpace(userAgent))
|
||||
{
|
||||
user.UserAgent = userAgent;
|
||||
}
|
||||
|
||||
await database.SaveChangesAsync();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue