From e5c34e70963ffdbb3a1621d7d4ecca1c6e39feb1 Mon Sep 17 00:00:00 2001 From: JPVenson Date: Sat, 23 May 2026 17:46:39 +0000 Subject: [PATCH] Fix non changing username creation --- Jellyfin.Api/Controllers/StartupController.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Jellyfin.Api/Controllers/StartupController.cs b/Jellyfin.Api/Controllers/StartupController.cs index 6bc795cb35..2d72d24711 100644 --- a/Jellyfin.Api/Controllers/StartupController.cs +++ b/Jellyfin.Api/Controllers/StartupController.cs @@ -144,10 +144,12 @@ public class StartupController : BaseJellyfinApiController await _userManager.UpdateUserAsync(user).ConfigureAwait(false); - if (startupUserDto.Name is not null) +#pragma warning disable CA1309 // Use ordinal string comparison + if (startupUserDto.Name is not null && !startupUserDto.Name.Equals(user.Username, StringComparison.InvariantCultureIgnoreCase)) { await _userManager.RenameUser(user.Id, user.Username, startupUserDto.Name).ConfigureAwait(false); } +#pragma warning restore CA1309 // Use ordinal string comparison if (!string.IsNullOrEmpty(startupUserDto.Password)) {