diff options
| author | Claus Vium <cvium@users.noreply.github.com> | 2021-09-03 19:17:13 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-09-03 19:17:13 +0200 |
| commit | fb5385f1df55c7a2ee35981ac138cee6c62c903d (patch) | |
| tree | 8ca7b09583a1195e507d347bcbddbabb039f47fc /Jellyfin.Server.Implementations/Users/UserManager.cs | |
| parent | 95ca1d54876e928dc654736ff5a279728c0f9ed0 (diff) | |
| parent | ff9d14c8119f6cf77f21e4ebcc97c5580725b882 (diff) | |
Merge pull request #6201 from barronpm/authenticationdb-efcore
Migrate Authentication DB to EF Core
Diffstat (limited to 'Jellyfin.Server.Implementations/Users/UserManager.cs')
| -rw-r--r-- | Jellyfin.Server.Implementations/Users/UserManager.cs | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/Jellyfin.Server.Implementations/Users/UserManager.cs b/Jellyfin.Server.Implementations/Users/UserManager.cs index 27d4f40d3..02377bfd7 100644 --- a/Jellyfin.Server.Implementations/Users/UserManager.cs +++ b/Jellyfin.Server.Implementations/Users/UserManager.cs @@ -164,15 +164,6 @@ namespace Jellyfin.Server.Implementations.Users } /// <inheritdoc/> - public void UpdateUser(User user) - { - using var dbContext = _dbProvider.CreateContext(); - dbContext.Users.Update(user); - _users[user.Id] = user; - dbContext.SaveChanges(); - } - - /// <inheritdoc/> public async Task UpdateUserAsync(User user) { await using var dbContext = _dbProvider.CreateContext(); @@ -271,9 +262,9 @@ namespace Jellyfin.Server.Implementations.Users } /// <inheritdoc/> - public void ResetEasyPassword(User user) + public Task ResetEasyPassword(User user) { - ChangeEasyPassword(user, string.Empty, null); + return ChangeEasyPassword(user, string.Empty, null); } /// <inheritdoc/> @@ -291,7 +282,7 @@ namespace Jellyfin.Server.Implementations.Users } /// <inheritdoc/> - public void ChangeEasyPassword(User user, string newPassword, string? newPasswordSha1) + public async Task ChangeEasyPassword(User user, string newPassword, string? newPasswordSha1) { if (newPassword != null) { @@ -304,7 +295,7 @@ namespace Jellyfin.Server.Implementations.Users } user.EasyPassword = newPasswordSha1; - UpdateUser(user); + await UpdateUserAsync(user).ConfigureAwait(false); _eventManager.Publish(new UserPasswordChangedEventArgs(user)); } |
