appUser.updatePassword(encodePassword);
this.userRepository.saveAndFlush(appUser);
if (sendPasswordToEmail.booleanValue()) {
final EmailDetail emailDetail = new EmailDetail(appUser.getOffice().getName(), appUser.getFirstname(), appUser.getEmail(),
appUser.getUsername());
this.emailService.sendToUserAccount(emailDetail, unencodedPassword);
}
}