Package org.zanata.model

Examples of org.zanata.model.HAccountResetPasswordKey


    }

    @End
    public String requestReset() {
        account = accountDAO.getByUsernameAndEmail(username, email);
        HAccountResetPasswordKey key =
                userAccountServiceImpl.requestPasswordReset(account);

        if (key == null) {
            FacesMessages.instance().add("No such account found");
            return null;
        } else {
            String message =
                    emailServiceImpl.sendPasswordResetEmail(account.getPerson(),
                            key.getKeyHash());
            FacesMessages.instance().add(message);
            return "/home.xhtml";
        }

    }
View Full Code Here


    private RoleAssignmentRuleDAO roleAssignmentRuleDAO;

    @Override
    public void clearPasswordResetRequests(HAccount account) {
        // TODO This should be done in a DAO
        HAccountResetPasswordKey key =
                (HAccountResetPasswordKey) session
                        .createCriteria(HAccountResetPasswordKey.class)
                        .add(Restrictions.eq("account", account))
                        .uniqueResult();
        if (key != null) {
View Full Code Here

            return null;
        }

        clearPasswordResetRequests(account);

        HAccountResetPasswordKey key = new HAccountResetPasswordKey();
        key.setAccount(account);
        key.setKeyHash(HashUtil.generateHash(account.getUsername()
                + account.getPasswordHash() + account.getPerson().getEmail()
                + account.getPerson().getName() + System.currentTimeMillis()));
        session.persist(key);

        log.info("Sent password reset key to {} ({})", account.getPerson()
View Full Code Here

TOP

Related Classes of org.zanata.model.HAccountResetPasswordKey

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.