Exemplo n.º 1
0
        public async Task <bool> ChangePasswordByAccountId(ValidationAccountVM validationAccount)
        {
            Account account = await accountRepository.GetById(validationAccount.AccountId);

            if (account == null)
            {
                return(false);
            }

            account.Password = HashPassword(validationAccount.Password);
            return(await accountRepository.ChangePassword(account));
        }
 public async Task <IActionResult> ChangePasswordByAccountId(ValidationAccountVM validationAccount)
 {
     return(Ok(await accountService.ChangePasswordByAccountId(validationAccount)));
 }
Exemplo n.º 3
0
 public async Task <bool> CheckOldPasswordByUsername(ValidationAccountVM validationAccount)
 {
     validationAccount.Password = HashPassword(validationAccount.Password);
     return(await accountRepository.CheckOldPasswordByUsername(validationAccount));
 }
 public async Task <IActionResult> CheckOldPasswordByUsername(ValidationAccountVM validationAccount)
 {
     return(Ok(await accountService.CheckOldPasswordByAccountId(validationAccount)));
 }