Skip to:
Content

BuddyPress.org

Changeset 5246 for branches/1.5


Ignore:
Timestamp:
10/15/2011 11:19:52 AM (13 years ago)
Author:
djpaul
Message:

Fix admins being unable to edit topics made by users who have since been marked as spammers. Fixes #3667

Location:
branches/1.5
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/1.5

  • branches/1.5/bp-forums/bp-forums-functions.php

    r5244 r5246  
    202202    extract( $r, EXTR_SKIP );
    203203
     204    // Check if the user is a spammer
     205    if ( bp_core_is_user_spammer( $bp->loggedin_user->id ) || bp_core_is_user_deleted( $bp->loggedin_user->id ) )
     206        return false;
     207
    204208    // bb_insert_topic() will append tags, but not remove them. So we remove all existing tags.
    205209    bb_remove_topic_tags( $topic_id );
     
    511515        return false;
    512516
    513     if ( bp_core_is_user_spammer( $poster_id ) || bp_core_is_user_deleted( $poster_id ) )
     517    if ( bp_core_is_user_spammer( $bp->loggedin_user->id ) || bp_core_is_user_deleted( $bp->loggedin_user->id ) )
    514518        return false;
    515519
Note: See TracChangeset for help on using the changeset viewer.