Validate login request and refactor login handling
This commit is contained in:
@@ -61,6 +61,14 @@ public class Profile
|
||||
DeviceIds.Add(deviceId);
|
||||
}
|
||||
|
||||
public void RecordSuccessfulLogin(string deviceId, string? platformName)
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(platformName) && Name != platformName)
|
||||
SetName(platformName);
|
||||
|
||||
AddDeviceId(deviceId);
|
||||
}
|
||||
|
||||
public void Ban()
|
||||
=> IsBanned = true;
|
||||
|
||||
Reference in New Issue
Block a user