The Free Software Media System - Server Backend & API
Keep authenticated user entity in sync with persisted login timestamps
Elian Van Cutsem47f567b6f1ad
diff --git a/Jellyfin.Server.Implementations/Users/UserManager.cs b/Jellyfin.Server.Implementations/Users/UserManager.csindex 80722af106..a3e5f12382 100644--- a/Jellyfin.Server.Implementations/Users/UserManager.cs+++ b/Jellyfin.Server.Implementations/Users/UserManager.cs@@ -616,6 +616,12 @@ namespace Jellyfin.Server.Implementations.Users.SetProperty(f => f.LastActivityDate, date).SetProperty(f => f.LastLoginDate, date)).ConfigureAwait(false);++ // ExecuteUpdateAsync bypasses the change tracker, so keep the+ // returned entity in sync. Otherwise SessionManager.LogSessionActivity+ // saves this (stale) entity in full and reverts LastLoginDate.+ user.LastActivityDate = date;+ user.LastLoginDate = date;}await dbContext.Users