Exemplo n.º 1
0
        public async Task <string> ConfirmResetPassword(ResetPasswordInputDto input)
        {
            var user = await _userManager.FindByEmailAsync(input.Email);

            if (user == null)
            {
                user = await _userManager.FindByNameAsync(input.Email);
            }
            if (user != null)
            {
                var identityResult = await _userManager.ResetPasswordAsync(user, input.Code, "123456");

                if (!identityResult.Succeeded)
                {
                    return("0");
                }
                return(user.Id);
            }
            else
            {
                return("0");
            }
        }
Exemplo n.º 2
0
 public void ResetPassword(ResetPasswordInputDto input)
 {
     _userAppService.ResetPassword(input);
 }
Exemplo n.º 3
0
        public void ResetPassword(ResetPasswordInputDto input)
        {
            var entity = DbContext.Set <UserEntity>().Find(input.Id);

            Mapper.Map(input, entity);
        }