aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/Session/SessionManager.cs
diff options
context:
space:
mode:
authorJose Alacan <samurayx89@gmail.com>2016-08-24 20:08:03 -0400
committerJose Alacan <samurayx89@gmail.com>2016-09-04 21:39:32 -0400
commit08fb2707be127b7940ab3ea095011e2180b6dabf (patch)
tree99d51adf29eba9582fbf01b493cf26ee7efbc97f /MediaBrowser.Server.Implementations/Session/SessionManager.cs
parent22ac006d4ee10261d579310fbd074e8a5d8b3d5a (diff)
Only usermanager should have access to the userrepository
Diffstat (limited to 'MediaBrowser.Server.Implementations/Session/SessionManager.cs')
-rw-r--r--MediaBrowser.Server.Implementations/Session/SessionManager.cs11
1 files changed, 2 insertions, 9 deletions
diff --git a/MediaBrowser.Server.Implementations/Session/SessionManager.cs b/MediaBrowser.Server.Implementations/Session/SessionManager.cs
index b21fcddd4..9243a951e 100644
--- a/MediaBrowser.Server.Implementations/Session/SessionManager.cs
+++ b/MediaBrowser.Server.Implementations/Session/SessionManager.cs
@@ -44,11 +44,6 @@ namespace MediaBrowser.Server.Implementations.Session
private readonly IUserDataManager _userDataRepository;
/// <summary>
- /// The _user repository
- /// </summary>
- private readonly IUserRepository _userRepository;
-
- /// <summary>
/// The _logger
/// </summary>
private readonly ILogger _logger;
@@ -99,11 +94,10 @@ namespace MediaBrowser.Server.Implementations.Session
private readonly SemaphoreSlim _sessionLock = new SemaphoreSlim(1, 1);
- public SessionManager(IUserDataManager userDataRepository, ILogger logger, IUserRepository userRepository, ILibraryManager libraryManager, IUserManager userManager, IMusicManager musicManager, IDtoService dtoService, IImageProcessor imageProcessor, IJsonSerializer jsonSerializer, IServerApplicationHost appHost, IHttpClient httpClient, IAuthenticationRepository authRepo, IDeviceManager deviceManager, IMediaSourceManager mediaSourceManager)
+ public SessionManager(IUserDataManager userDataRepository, ILogger logger, ILibraryManager libraryManager, IUserManager userManager, IMusicManager musicManager, IDtoService dtoService, IImageProcessor imageProcessor, IJsonSerializer jsonSerializer, IServerApplicationHost appHost, IHttpClient httpClient, IAuthenticationRepository authRepo, IDeviceManager deviceManager, IMediaSourceManager mediaSourceManager)
{
_userDataRepository = userDataRepository;
_logger = logger;
- _userRepository = userRepository;
_libraryManager = libraryManager;
_userManager = userManager;
_musicManager = musicManager;
@@ -253,8 +247,7 @@ namespace MediaBrowser.Server.Implementations.Session
{
try
{
- // Save this directly. No need to fire off all the events for this.
- await _userRepository.SaveUser(user, CancellationToken.None).ConfigureAwait(false);
+ await _userManager.UpdateUser(user).ConfigureAwait(false);
}
catch (Exception ex)
{