Skip to:
Content

BuddyPress.org

Changeset 3434


Ignore:
Timestamp:
11/17/2010 03:23:04 AM (13 years ago)
Author:
boonebgorges
Message:

Fires custom BP hook when user is marked as spam, in order to account for instances where Network is not enabled. Fixes #1975

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-activity.php

    r3403 r3434  
    11601160add_action( 'wpmu_delete_user', 'bp_activity_remove_data' );
    11611161add_action( 'delete_user', 'bp_activity_remove_data' );
    1162 add_action( 'make_spam_user', 'bp_activity_remove_data' );
     1162add_action( 'bp_make_spam_user', 'bp_activity_remove_data' );
    11631163
    11641164/**
  • trunk/bp-blogs.php

    r3421 r3434  
    717717add_action( 'wpmu_delete_user', 'bp_blogs_remove_data' );
    718718add_action( 'delete_user', 'bp_blogs_remove_data' );
    719 add_action( 'make_spam_user', 'bp_blogs_remove_data' );
     719add_action( 'bp_make_spam_user', 'bp_blogs_remove_data' );
    720720
    721721
  • trunk/bp-core.php

    r3393 r3434  
    458458
    459459        $wpdb->update( $wpdb->users, array( 'user_status' => $is_spam ), array( 'ID' => $bp->displayed_user->id ) );
    460 
     460       
    461461        if ( $is_spam )
    462462            bp_core_add_message( __( 'User marked as spammer. Spam users are visible only to site admins.', 'buddypress' ) );
     
    467467        if ( $is_spam && function_exists( 'bp_activity_hide_user_activity' ) )
    468468            bp_activity_hide_user_activity( $bp->displayed_user->id );
     469       
     470        // We need a special hook for is_spam so that components can delete data at spam time
     471        if ( $is_spam )
     472                do_action( 'bp_make_spam_user', $bp->displayed_user->id );
    469473
    470474        do_action( 'bp_core_action_set_spammer_status', $bp->displayed_user->id, $is_spam );
     
    19121916add_action( 'wpmu_delete_user', 'bp_core_remove_data' );
    19131917add_action( 'delete_user', 'bp_core_remove_data' );
    1914 add_action( 'make_spam_user', 'bp_core_remove_data' );
     1918add_action( 'bp_make_spam_user', 'bp_core_remove_data' );
    19151919
    19161920/**
  • trunk/bp-friends.php

    r3369 r3434  
    581581add_action( 'wpmu_delete_user', 'friends_remove_data' );
    582582add_action( 'delete_user', 'friends_remove_data' );
    583 add_action( 'make_spam_user', 'friends_remove_data' );
     583add_action( 'bp_make_spam_user', 'friends_remove_data' );
    584584
    585585
  • trunk/bp-xprofile.php

    r3403 r3434  
    903903add_action( 'wpmu_delete_user', 'xprofile_remove_data' );
    904904add_action( 'delete_user', 'xprofile_remove_data' );
    905 add_action( 'make_spam_user', 'xprofile_remove_data' );
     905add_action( 'bp_make_spam_user', 'xprofile_remove_data' );
    906906
    907907/*** XProfile Meta ****************************************************/
Note: See TracChangeset for help on using the changeset viewer.