The Free Software Media System - Server Backend & API
Add internal id for new users
Patrick Barronbecfe018f0e3
diff --git a/Jellyfin.Server.Implementations/Users/UserManager.cs b/Jellyfin.Server.Implementations/Users/UserManager.csindex 4dd41792d2..599efe583d 100644--- a/Jellyfin.Server.Implementations/Users/UserManager.cs+++ b/Jellyfin.Server.Implementations/Users/UserManager.cs@@ -190,10 +190,16 @@ namespace Jellyfin.Server.Implementations.Usersvar dbContext = _dbProvider.CreateContext();+ // Temporary measure until user item data is migrated.+ var max = dbContext.Users.Select(u => u.InternalId).Max();+var newUser = new User(name,_defaultAuthenticationProvider.GetType().FullName,- _defaultPasswordResetProvider.GetType().FullName);+ _defaultPasswordResetProvider.GetType().FullName)+ {+ InternalId = max + 1+ };dbContext.Users.Add(newUser);dbContext.SaveChanges();