Skip to:
Content
Pages
Categories
Search
Top
Bottom

Spammer still getting in?

  • @mrfent37

    Participant

    My bbPress forum is integrated with WooCommerce Memberships, so that only members can view topics and post replies. I’ve achieved this by editing all of the template files that bbPress has dealing with viewing a reply or being able to post. So none of the reply forms will even load if the user is not an active member. Still every once in a while, a spammer is able to create an account and post a new topic. How is this possible if they are not a member? Is there another way that someone is able to create a forum post that doesn’t involve having to click the “Create new topic” button (which isn’t there) can they post via URL or RSS? Is there any way to see how they are posting?

Viewing 7 replies - 1 through 7 (of 7 total)
  • @robin-w

    Moderator

    if only registered users can post, then I’d start by looking at how they are registering – bbpress just uses wordpress registration, so how are your users joining ?

    @mrfent37

    Participant

    It’s also a woocommerce site, and anyone can register to download digital goods without making a purchase. So that’s how they are registering, but they shouldn’t be able to post anything to the forum, yet some how they are able to.

    @robin-w

    Moderator

    so what does ‘ I’ve achieved this by editing all of the template files that bbPress has dealing with viewing a reply or being able to post. ‘ mean ?

    @mrfent37

    Participant

    Ok for example, in the template file loop-single-reply.php, at the bottom, instead of this normal code:

    <div class="bbp-reply-content">
    
    	<?php do_action( 'bbp_theme_before_reply_content' ); ?>
    
    	<?php bbp_reply_content(); ?>
    
    	<?php do_action( 'bbp_theme_after_reply_content' ); ?>
    
    </div><!-- .bbp-reply-content -->
    

    I have custom code wrapped around the bbp_reply_content(); function so that the reply form will only load for my active members:

    <div class="bbp-reply-content">
    
    	<?php do_action( 'bbp_theme_before_reply_content' ); ?>
    	<?php if (((function_exists('wc_memberships_is_user_active_member')) && (wc_memberships_is_user_active_member(get_current_user_id(), 'biotic-pro-membership'))) { ?>
    		<?php bbp_reply_content(); ?>
    	<?php } else {	
    		echo $noaccess;
    	} ?>
    	<?php do_action( 'bbp_theme_after_reply_content' ); ?>
    
    </div><!-- .bbp-reply-content -->

    @robin-w

    Moderator

    hhmm… not sure how that would prevent the forums being shown

    I’d suggest you add that code to

    form-topic.php and form-reply.php

    @mrfent37

    Participant

    I do have that code on those other templates as well, so it works well. You know what though, I just found out that I didn’t have any custom code added to form-topic.php, so that must be how they are creating new topics. SMH. I thought that I had all of the template files customized and that they were somehow creating new posts via URL, RSS, or some other “back door” method. Thanks for your time, you can close this post.

    @robin-w

    Moderator

    great – glad you are fixed !!

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.
Skip to toolbar