Opened 16 years ago
Closed 16 years ago
#1843 closed defect (bug) (fixed)
Remove delete activity link for user 0
| Reported by: | boonebgorges | Owned by: | |
|---|---|---|---|
| Priority: | minor | Milestone: | 1.2.1 |
| Component: | Version: | ||
| Severity: | 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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
(In [2718]) Only show delete link for logged in users. Fixes #1843. props boonebgorges