Skip to:
Content

BuddyPress.org

Changeset 4306


Ignore:
Timestamp:
04/29/2011 10:54:33 PM (14 years ago)
Author:
djpaul
Message:

Use WP core functions when marking user as spam (on multisite).
Removes duplicate invocation of make_spam_blog action.
Adds new BP ham user action.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-members/bp-members-actions.php

    r4137 r4306  
    5555            // Update the blog status
    5656            update_blog_status( $details->userblog_id, 'spam', $is_spam );
    57 
    58             // Fire the standard multisite hook
    59             do_action( 'make_spam_blog', $details->userblog_id );
    6057        }
    6158
    6259        // Finally, mark this user as a spammer
    6360        if ( is_multisite() )
    64             $wpdb->update( $wpdb->users, array( 'spam' => $is_spam ), array( 'ID' => $bp->displayed_user->id ) );
     61            update_user_status( $bp->displayed_user->id, 'spam', 1 );
    6562
    6663        $wpdb->update( $wpdb->users, array( 'user_status' => $is_spam ), array( 'ID' => $bp->displayed_user->id ) );
     
    7572            bp_activity_hide_user_activity( $bp->displayed_user->id );
    7673
    77         // We need a special hook for is_spam so that components can
    78         // delete data at spam time
     74        // We need a special hook for is_spam so that components can delete data at spam time
    7975        if ( $is_spam )
    8076            do_action( 'bp_make_spam_user', $bp->displayed_user->id );
     77        else
     78            do_action( 'bp_make_ham_user',  $bp->displayed_user->id );
    8179
    8280        do_action( 'bp_members_action_set_spammer_status', $bp->displayed_user->id, $is_spam );
    83 
    8481        bp_core_redirect( wp_get_referer() );
    8582    }
Note: See TracChangeset for help on using the changeset viewer.