public void validatePasswordModify(PasswordModifyForm passwordModifyForm) {

        Visitor visitor = ThreadContext.getSessionVisitor();

        User user = userMgr.getUser(visitor.getLoginUserId());

        // 校验密码
        if (!signMgr.validate(user.getPassword(), passwordModifyForm.getOld_password())) {
            throw new FieldException(PasswordModifyForm.OLD_PASSWORD, "password.not.right", null);
        }

        if (!passwordModifyForm.getNew_password().equals(passwordModifyForm.getNew_password_2())) {
            throw new FieldException(PasswordModifyForm.NEW_PASSWORD, "two.password.not.equal", null);
        }
    }
public void validatePasswordModify ( PasswordModifyForm passwordModifyForm ) { Visitor visitor = ThreadContext . getSessionVisitor ( ) ; User user = userMgr . getUser ( visitor . getLoginUserId ( ) ) ; if ( ! signMgr . validate ( user . getPassword ( ) , passwordModifyForm . getOld_password ( ) ) ) { throw new FieldException ( PasswordModifyForm . OLD_PASSWORD , "password.not.right" , null ) ; } if ( ! passwordModifyForm . getNew_password ( ) . equals ( passwordModifyForm . getNew_password_2 ( ) ) ) { throw new FieldException ( PasswordModifyForm . NEW_PASSWORD , "two.password.not.equal" , null ) ; } }
验证密码更新