Skip to content

Commit

Permalink
Fix build warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Cyberboss committed Sep 24, 2024
1 parent e14d998 commit 1931b25
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Tgstation.Server.Host/Authority/UserAuthority.cs
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,9 @@ public async ValueTask<AuthorityResponse<User>> Create(
{
var hasZeroLengthPassword = createRequest.Password?.Length == 0;
var hasOAuthConnections = (createRequest.OAuthConnections?.Count > 0) == true;
if (!(needZeroLengthPasswordWithOAuthConnections != false && hasZeroLengthPassword && hasOAuthConnections)) // special case allow PasswordHash to be null by setting Password to "" if OAuthConnections are set

// special case allow PasswordHash to be null by setting Password to "" if OAuthConnections are set
if (!(needZeroLengthPasswordWithOAuthConnections != false && hasZeroLengthPassword && hasOAuthConnections))
{
var result = TrySetPassword(dbUser, createRequest.Password!, true);
if (result != null)
Expand Down

0 comments on commit 1931b25

Please sign in to comment.