From d7f3507d4479967c9ea50b3fe8794895cf0e2c3e Mon Sep 17 00:00:00 2001 From: Vincent Salucci <26154748+vincentsalucci@users.noreply.github.com> Date: Wed, 26 May 2021 15:51:54 -0500 Subject: [PATCH] [Reset Password] Added new event type for admin password reset (#1350) --- src/Core/Enums/EventType.cs | 1 + src/Core/Services/Implementations/UserService.cs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Core/Enums/EventType.cs b/src/Core/Enums/EventType.cs index 2c22a94f72..760765ca7b 100644 --- a/src/Core/Enums/EventType.cs +++ b/src/Core/Enums/EventType.cs @@ -46,6 +46,7 @@ OrganizationUser_UnlinkedSso = 1505, OrganizationUser_ResetPassword_Enroll = 1506, OrganizationUser_ResetPassword_Withdraw = 1507, + OrganizationUser_AdminResetPassword = 1508, Organization_Updated = 1600, Organization_PurgedVault = 1601, diff --git a/src/Core/Services/Implementations/UserService.cs b/src/Core/Services/Implementations/UserService.cs index 26f9388ca9..c070849236 100644 --- a/src/Core/Services/Implementations/UserService.cs +++ b/src/Core/Services/Implementations/UserService.cs @@ -690,7 +690,7 @@ namespace Bit.Core.Services await _userRepository.ReplaceAsync(user); // TODO Reset Password - Send email alerting user of changed password - await _eventService.LogUserEventAsync(user.Id, EventType.User_ChangedPassword); + await _eventService.LogOrganizationUserEventAsync(orgUser, EventType.OrganizationUser_AdminResetPassword); await _pushService.PushLogOutAsync(user.Id); return IdentityResult.Success;