@Override @Transactional(timeout = 60) public VerificationToken resentToken(VerificationToken verificationToken) { generateToken(verificationToken); if (verificationToken.getType() == VerificationTokenPK.Type.PASSWORD_RESET && verificationToken.isVerified()) { verificationToken.setVerified(false); } VerificationToken updated = verificationTokenDao.update(verificationToken); emailService.sentVerificationToken( updated.getEmail(), verificationToken.getType(), updated.getToken()); return verificationToken; }
@Override @Transactional public VerificationToken update(VerificationToken verificationToken) { return verificationTokenDao.update(verificationToken); }