Reorder setup user update

This commit is contained in:
JPVenson
2026-05-23 15:28:30 +00:00
parent c4fb0285fc
commit 9526083523

View File

@@ -142,13 +142,13 @@ public class StartupController : BaseJellyfinApiController
return BadRequest("Password must not be empty");
}
await _userManager.UpdateUserAsync(user).ConfigureAwait(false);
if (startupUserDto.Name is not null)
{
await _userManager.RenameUser(user.Id, user.Username, startupUserDto.Name).ConfigureAwait(false);
}
await _userManager.UpdateUserAsync(user).ConfigureAwait(false);
if (!string.IsNullOrEmpty(startupUserDto.Password))
{
await _userManager.ChangePassword(user.Id, startupUserDto.Password).ConfigureAwait(false);