aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Server.Implementations
diff options
context:
space:
mode:
authorJxiced <mangonation420@gmail.com>2025-02-23 22:16:35 +0000
committerJxiced <mangonation420@gmail.com>2025-02-23 22:16:35 +0000
commite7bc86ebb8496615e0b3f73eb4f13ab4c0913dc8 (patch)
tree6075fb78cec1b92e47561d610f29c82d0dedf9d1 /Jellyfin.Server.Implementations
parent7aa96dfc202db23fba7b402bd17d4854f9249d27 (diff)
Move throw into interface to use in wizard, check for null and invalid username.
Diffstat (limited to 'Jellyfin.Server.Implementations')
-rw-r--r--Jellyfin.Server.Implementations/Users/UserManager.cs7
1 files changed, 2 insertions, 5 deletions
diff --git a/Jellyfin.Server.Implementations/Users/UserManager.cs b/Jellyfin.Server.Implementations/Users/UserManager.cs
index 91cf9c972..5a11fadc5 100644
--- a/Jellyfin.Server.Implementations/Users/UserManager.cs
+++ b/Jellyfin.Server.Implementations/Users/UserManager.cs
@@ -176,10 +176,6 @@ namespace Jellyfin.Server.Implementations.Users
/// <inheritdoc/>
public async Task UpdateUserAsync(User user)
{
- ArgumentNullException.ThrowIfNull(user);
-
- ThrowIfInvalidUsername(user.Username);
-
var dbContext = await _dbProvider.CreateDbContextAsync().ConfigureAwait(false);
await using (dbContext.ConfigureAwait(false))
{
@@ -737,7 +733,8 @@ namespace Jellyfin.Server.Implementations.Users
_users[user.Id] = user;
}
- internal static void ThrowIfInvalidUsername(string name)
+ /// <inheritdoc/>
+ public void ThrowIfInvalidUsername(string name)
{
if (!string.IsNullOrWhiteSpace(name) && ValidUsernameRegex().IsMatch(name))
{