Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
07/04/2011 06:12:21 AM (13 years ago)
Author:
johnjamesjacoby
Message:

Prevent spam or deleted users from updating activity streams.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-activity/bp-activity-functions.php

    r4558 r4590  
    658658        return false;
    659659
     660    if ( bp_core_is_user_spammer( $user_id ) || bp_core_is_user_deleted( $user_id ) )
     661        return false;
     662
    660663    // Record this on the user's profile
    661     $from_user_link = bp_core_get_userlink( $user_id );
    662     $activity_action = sprintf( __( '%s posted an update:', 'buddypress' ), $from_user_link );
     664    $from_user_link   = bp_core_get_userlink( $user_id );
     665    $activity_action  = sprintf( __( '%s posted an update:', 'buddypress' ), $from_user_link );
    663666    $activity_content = $content;
    664 
    665     $primary_link = bp_core_get_userlink( $user_id, false, true );
     667    $primary_link     = bp_core_get_userlink( $user_id, false, true );
    666668
    667669    // Now write the values
Note: See TracChangeset for help on using the changeset viewer.