aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Server.Implementations
diff options
context:
space:
mode:
Diffstat (limited to 'Jellyfin.Server.Implementations')
-rw-r--r--Jellyfin.Server.Implementations/Devices/DeviceManager.cs5
-rw-r--r--Jellyfin.Server.Implementations/Users/UserManager.cs10
2 files changed, 3 insertions, 12 deletions
diff --git a/Jellyfin.Server.Implementations/Devices/DeviceManager.cs b/Jellyfin.Server.Implementations/Devices/DeviceManager.cs
index 3203bed18..0728f1179 100644
--- a/Jellyfin.Server.Implementations/Devices/DeviceManager.cs
+++ b/Jellyfin.Server.Implementations/Devices/DeviceManager.cs
@@ -201,10 +201,7 @@ namespace Jellyfin.Server.Implementations.Devices
/// <inheritdoc />
public bool CanAccessDevice(User user, string deviceId)
{
- if (user == null)
- {
- throw new ArgumentNullException(nameof(user));
- }
+ ArgumentNullException.ThrowIfNull(user);
if (string.IsNullOrEmpty(deviceId))
{
diff --git a/Jellyfin.Server.Implementations/Users/UserManager.cs b/Jellyfin.Server.Implementations/Users/UserManager.cs
index 6a2ef74dd..ed90e81c6 100644
--- a/Jellyfin.Server.Implementations/Users/UserManager.cs
+++ b/Jellyfin.Server.Implementations/Users/UserManager.cs
@@ -130,10 +130,7 @@ namespace Jellyfin.Server.Implementations.Users
/// <inheritdoc/>
public async Task RenameUser(User user, string newName)
{
- if (user == null)
- {
- throw new ArgumentNullException(nameof(user));
- }
+ ArgumentNullException.ThrowIfNull(user);
ThrowIfInvalidUsername(newName);
@@ -267,10 +264,7 @@ namespace Jellyfin.Server.Implementations.Users
/// <inheritdoc/>
public async Task ChangePassword(User user, string newPassword)
{
- if (user == null)
- {
- throw new ArgumentNullException(nameof(user));
- }
+ ArgumentNullException.ThrowIfNull(user);
await GetAuthenticationProvider(user).ChangePassword(user, newPassword).ConfigureAwait(false);
await UpdateUserAsync(user).ConfigureAwait(false);