mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-11-15 18:08:53 -07:00
Clean up user deletion
This commit is contained in:
parent
a7b29e2fe0
commit
7364155579
@ -257,16 +257,6 @@ namespace Jellyfin.Server.Implementations.Users
|
||||
}
|
||||
|
||||
await using var dbContext = _dbProvider.CreateContext();
|
||||
|
||||
// Clear all entities related to the user from the database.
|
||||
if (user.ProfileImage != null)
|
||||
{
|
||||
dbContext.Remove(user.ProfileImage);
|
||||
}
|
||||
|
||||
dbContext.RemoveRange(user.Permissions);
|
||||
dbContext.RemoveRange(user.Preferences);
|
||||
dbContext.RemoveRange(user.AccessSchedules);
|
||||
dbContext.Users.Remove(user);
|
||||
await dbContext.SaveChangesAsync().ConfigureAwait(false);
|
||||
_users.Remove(userId);
|
||||
|
Loading…
Reference in New Issue
Block a user