ensures the UsersController raises the appropriate event when an admin user changes another user's password
This commit is contained in:
@@ -562,6 +562,15 @@ namespace Umbraco.Web.Editors
|
||||
var passwordChangeResult = await passwordChanger.ChangePasswordWithIdentityAsync(Security.CurrentUser, found, userSave.ChangePassword, UserManager);
|
||||
if (passwordChangeResult.Success)
|
||||
{
|
||||
var userMgr = this.TryGetOwinContext().Result.GetBackOfficeUserManager();
|
||||
|
||||
//raise the event - NOTE that the ChangePassword.Reset value here doesn't mean it's been 'reset', it means
|
||||
//it's been changed by a back office user
|
||||
if (userSave.ChangePassword.Reset.HasValue && userSave.ChangePassword.Reset.Value)
|
||||
{
|
||||
userMgr.RaisePasswordChangedEvent(intId.Result);
|
||||
}
|
||||
|
||||
//need to re-get the user
|
||||
found = Services.UserService.GetUserById(intId.Result);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user