1
0
mirror of https://github.com/bitwarden/server.git synced 2025-04-05 13:08:17 -05:00

resolved circular dependency in user store

This commit is contained in:
Kyle Spearrin 2016-02-21 01:24:12 -05:00
parent 3014e47373
commit 8b2186989f

View File

@ -19,16 +19,13 @@ namespace Bit.Core.Identity
IUserSecurityStampStore<User> IUserSecurityStampStore<User>
{ {
private readonly IUserRepository _userRepository; private readonly IUserRepository _userRepository;
private readonly IUserService _userService;
private readonly CurrentContext _currentContext; private readonly CurrentContext _currentContext;
public UserStore( public UserStore(
IUserRepository userRepository, IUserRepository userRepository,
IUserService userService,
CurrentContext currentContext) CurrentContext currentContext)
{ {
_userRepository = userRepository; _userRepository = userRepository;
_userService = userService;
_currentContext = currentContext; _currentContext = currentContext;
} }
@ -154,7 +151,8 @@ namespace Bit.Core.Identity
public async Task<IdentityResult> UpdateAsync(User user, CancellationToken cancellationToken = default(CancellationToken)) public async Task<IdentityResult> UpdateAsync(User user, CancellationToken cancellationToken = default(CancellationToken))
{ {
await _userService.SaveUserAsync(user); user.RevisionDate = DateTime.UtcNow;
await _userRepository.ReplaceAsync(user);
return IdentityResult.Success; return IdentityResult.Success;
} }