Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
01/19/2013 03:40:28 AM (14 years ago)
Author:
boonebgorges
Message:

Allow activity items to be deleted when the user_id key is empty

Some plugins create activity items that are not attached to a specific user_id.
The activity deletion request handlers (AJAX and bp-activity-actions) prevent
deletion of activity items when the item's user_id value is empty. This
changeset moves this security measure to the bp_activity_user_can_delete()
function, so that anonymous activity items can still be deleted by item admins.

Props magnus78

Fixes #4735

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-templates/bp-legacy/buddypress-functions.php

    r6679 r6732  
    618618
    619619        // Check access
    620         if ( empty( $activity->user_id ) || ! bp_activity_user_can_delete( $activity ) )
     620        if ( ! bp_activity_user_can_delete( $activity ) )
    621621                exit( '-1' );
    622622
Note: See TracChangeset for help on using the changeset viewer.