Sfoglia il codice sorgente

Add another null check

Patrick Barron 5 anni fa
parent
commit
9a853ca089
1 ha cambiato i file con 5 aggiunte e 0 eliminazioni
  1. 5 0
      Jellyfin.Data/Entities/User.cs

+ 5 - 0
Jellyfin.Data/Entities/User.cs

@@ -38,6 +38,11 @@ namespace Jellyfin.Data.Entities
                 throw new ArgumentNullException(nameof(authenticationProviderId));
             }
 
+            if (string.IsNullOrEmpty(passwordResetProviderId))
+            {
+                throw new ArgumentNullException(nameof(passwordResetProviderId));
+            }
+
             Username = username;
             AuthenticationProviderId = authenticationProviderId;
             PasswordResetProviderId = passwordResetProviderId;