mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-10-26 16:45:09 +00:00
Merge pull request #17302 from ElianCodes/fix/lastlogindate-stale-entity
Keep authenticated user entity in sync with persisted login timestamps
This commit is contained in:
1 file changed
+6
@@ -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
|
||||
|
||||
Reference in new issue
Block a user