mirror of
https://github.com/bitwarden/server.git
synced 2024-12-22 16:57:36 +01:00
resolved circular dependency in user store
This commit is contained in:
parent
3014e47373
commit
8b2186989f
@ -19,16 +19,13 @@ namespace Bit.Core.Identity
|
||||
IUserSecurityStampStore<User>
|
||||
{
|
||||
private readonly IUserRepository _userRepository;
|
||||
private readonly IUserService _userService;
|
||||
private readonly CurrentContext _currentContext;
|
||||
|
||||
public UserStore(
|
||||
IUserRepository userRepository,
|
||||
IUserService userService,
|
||||
CurrentContext currentContext)
|
||||
{
|
||||
_userRepository = userRepository;
|
||||
_userService = userService;
|
||||
_currentContext = currentContext;
|
||||
}
|
||||
|
||||
@ -154,7 +151,8 @@ namespace Bit.Core.Identity
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user