|
|
@ -62,16 +62,19 @@ namespace Volo.Abp.Account |
|
|
|
|
|
|
|
|
public virtual async Task ResetPasswordAsync(ResetPasswordDto input) |
|
|
public virtual async Task ResetPasswordAsync(ResetPasswordDto input) |
|
|
{ |
|
|
{ |
|
|
await IdentityOptions.SetAsync(); |
|
|
using (CurrentTenant.Change(input.TenantId)) |
|
|
|
|
|
{ |
|
|
|
|
|
await IdentityOptions.SetAsync(); |
|
|
|
|
|
|
|
|
var user = await UserManager.GetByIdAsync(input.UserId); |
|
|
var user = await UserManager.GetByIdAsync(input.UserId); |
|
|
(await UserManager.ResetPasswordAsync(user, input.ResetToken, input.Password)).CheckErrors(); |
|
|
(await UserManager.ResetPasswordAsync(user, input.ResetToken, input.Password)).CheckErrors(); |
|
|
|
|
|
|
|
|
await IdentitySecurityLogManager.SaveAsync(new IdentitySecurityLogContext |
|
|
await IdentitySecurityLogManager.SaveAsync(new IdentitySecurityLogContext |
|
|
{ |
|
|
{ |
|
|
Identity = IdentitySecurityLogIdentityConsts.Identity, |
|
|
Identity = IdentitySecurityLogIdentityConsts.Identity, |
|
|
Action = IdentitySecurityLogActionConsts.ChangePassword |
|
|
Action = IdentitySecurityLogActionConsts.ChangePassword |
|
|
}); |
|
|
}); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
protected virtual async Task<IdentityUser> GetUserByEmail(string email) |
|
|
protected virtual async Task<IdentityUser> GetUserByEmail(string email) |
|
|
|