aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBond-009 <bond.009@outlook.com>2026-07-20 08:36:53 +0200
committerGitHub <noreply@github.com>2026-07-20 08:36:53 +0200
commitaead9c0e229534296c7cc61d0b1850e602189178 (patch)
treed946135e8752c46ab2a4f04d3baa760078ad92f7
parent2fd747432a2d08e2c067c86ade19c0bf2453663e (diff)
parent47f567b6f1ad9729ad3721a5798cab03978300f5 (diff)
Merge pull request #17302 from ElianCodes/fix/lastlogindate-stale-entity
Keep authenticated user entity in sync with persisted login timestamps
-rw-r--r--Jellyfin.Server.Implementations/Users/UserManager.cs6
1 files changed, 6 insertions, 0 deletions
diff --git a/Jellyfin.Server.Implementations/Users/UserManager.cs b/Jellyfin.Server.Implementations/Users/UserManager.cs
index 583f29f94f..bb877b62b0 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