mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-25 22:17:51 +01:00
Fixes #1527
This commit is contained in:
@@ -63,11 +63,15 @@ namespace Tgstation.Server.Host.Security
|
||||
PrincipalContext pc = null;
|
||||
UserPrincipal principal = null;
|
||||
|
||||
GetUserAndDomainName(user.SystemIdentifier, out _, out var domainName);
|
||||
|
||||
bool TryGetPrincipalFromContextType(ContextType contextType)
|
||||
{
|
||||
try
|
||||
{
|
||||
pc = new PrincipalContext(contextType);
|
||||
pc = domainName != null
|
||||
? new PrincipalContext(contextType, domainName)
|
||||
: new PrincipalContext(contextType);
|
||||
cancellationToken.ThrowIfCancellationRequested();
|
||||
principal = UserPrincipal.FindByIdentity(pc, user.SystemIdentifier);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user