mirror of
https://github.com/immense/Remotely.git
synced 2025-10-26 11:27:15 +00:00
Normalize username.
This commit is contained in:
parent
f53b33fb50
commit
4ea68cf40d
@ -465,6 +465,7 @@ namespace Remotely.Server.Services
|
||||
var org = RemotelyContext.Organizations
|
||||
.Include(x => x.RemotelyUsers)
|
||||
.FirstOrDefault(x => x.ID == organizationID);
|
||||
RemotelyContext.Users.Add(user);
|
||||
org.RemotelyUsers.Add(user);
|
||||
await RemotelyContext.SaveChangesAsync();
|
||||
return true;
|
||||
@ -872,7 +873,7 @@ namespace Remotely.Server.Services
|
||||
}
|
||||
return RemotelyContext.Users
|
||||
.Include(x => x.Organization)
|
||||
.FirstOrDefault(x => x.UserName == userName);
|
||||
.FirstOrDefault(x => x.UserName.ToLower().Trim() == userName.ToLower().Trim());
|
||||
}
|
||||
|
||||
public RemotelyUserOptions GetUserOptions(string userName)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user