aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Data/Entities/User.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Jellyfin.Data/Entities/User.cs')
-rw-r--r--Jellyfin.Data/Entities/User.cs17
1 files changed, 3 insertions, 14 deletions
diff --git a/Jellyfin.Data/Entities/User.cs b/Jellyfin.Data/Entities/User.cs
index 58d0510cd..eb59e70f3 100644
--- a/Jellyfin.Data/Entities/User.cs
+++ b/Jellyfin.Data/Entities/User.cs
@@ -29,20 +29,9 @@ namespace Jellyfin.Data.Entities
/// <param name="passwordResetProviderId">The Id of the user's password reset provider.</param>
public User(string username, string authenticationProviderId, string passwordResetProviderId)
{
- if (string.IsNullOrEmpty(username))
- {
- throw new ArgumentNullException(nameof(username));
- }
-
- if (string.IsNullOrEmpty(authenticationProviderId))
- {
- throw new ArgumentNullException(nameof(authenticationProviderId));
- }
-
- if (string.IsNullOrEmpty(passwordResetProviderId))
- {
- throw new ArgumentNullException(nameof(passwordResetProviderId));
- }
+ ArgumentException.ThrowIfNullOrEmpty(username);
+ ArgumentException.ThrowIfNullOrEmpty(authenticationProviderId);
+ ArgumentException.ThrowIfNullOrEmpty(passwordResetProviderId);
Username = username;
AuthenticationProviderId = authenticationProviderId;