Skip to:
Content

BuddyPress.org

Changeset 5244


Ignore:
Timestamp:
10/15/2011 08:53:12 AM (15 years ago)
Author:
johnjamesjacoby
Message:

Prevent spam or deleted users from posting new topics or posts in forums. (1.5 branch)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.5/bp-forums/bp-forums-functions.php

    r5129 r5244  
    166166                return false;
    167167
     168        if ( empty( $topic_poster ) )
     169                return false;
     170
     171        if ( bp_core_is_user_spammer( $topic_poster ) || bp_core_is_user_deleted( $topic_poster ) )
     172                return false;
     173
    168174        if ( empty( $topic_slug ) )
    169175                $topic_slug = sanitize_title( $topic_title );
     
    502508                $post_position = $post->post_position;
    503509
     510        if ( empty( $poster_id ) )
     511                return false;
     512
     513        if ( bp_core_is_user_spammer( $poster_id ) || bp_core_is_user_deleted( $poster_id ) )
     514                return false;
     515
    504516        $post_id = bb_insert_post( array( 'post_id' => $post_id, 'topic_id' => $topic_id, 'post_text' => stripslashes( trim( $post_text ) ), 'post_time' => $post_time, 'poster_id' => $poster_id, 'poster_ip' => $poster_ip, 'post_status' => $post_status, 'post_position' => $post_position ) );
    505517
Note: See TracChangeset for help on using the changeset viewer.