Skip to:
Content

BuddyPress.org

Opened 13 years ago

Closed 13 years ago

#1843 closed defect (bug) (fixed)

Remove delete activity link for user 0

Reported by: boonebgorges's profile boonebgorges Owned by:
Milestone: 1.2.1 Priority: minor
Severity: Version:
Component: Keywords: activity, delete, non-logged-in, has-patch, needs-testing
Cc:

Description

bp_activity_content_filter() in bp-activity-templatetags.php checks to see whether it should include the Delete Activity link based (among other things) on whether $bp->loggedin_user->id == $activities_template->activity->user_id. But when the activity's user_id is 0, either because of a plugin like http://wordpress.org/extend/plugins/buddypress-group-twitter/ or http://teleogistic.net/bp-include-non-member-comments or because of an error, the non-logged-in viewers of the activity stream can see the Delete button (though it doesn't work).

I've attached a patch that checks to make sure user_id != 0.

Attachments (1)

no-activity-delete-for-user-0.patch (961 bytes) - added by boonebgorges 13 years ago.

Download all attachments as: .zip

Change History (3)

#1 @boonebgorges
13 years ago

  • Keywords has-patch needs-testing added

#2 @johnjamesjacoby
13 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [2718]) Only show delete link for logged in users. Fixes #1843. props boonebgorges

Note: See TracTickets for help on using tickets.