[buddypress-trac] [BuddyPress Trac] #6323: Unable to get user ID of activity items before they are deleted
buddypress-trac
noreply at wordpress.org
Thu Mar 26 21:10:43 UTC 2015
#6323: Unable to get user ID of activity items before they are deleted
----------------------------------+-----------------
Reporter: johnjamesjacoby | Owner:
Type: enhancement | Status: new
Priority: high | Milestone: 2.3
Component: Component - Activity | Version: 1.1
Severity: normal | Keywords:
----------------------------------+-----------------
When deleting an activity stream item, it's not possible to get any
relevant data about those items before they are deleted from the database.
Our existing implementation does pass the activity ID's themselves around,
and calls to `bp_activity_delete()` do have before & after actions for
execution, but all those allow for is seeing what the query parameters are
for the items being deleted, and they do not relay back anything about the
actual items themselves.
What I'm trying to do:
* Keep a count of activity stream updates per user
* When an activity item is deleted, check the user ID and flush the cached
count for the activity author
This is not currently possible because there is no way to intercept the
deletion request, and the person deleting the activity might not be the
same user that posted it, so the existing `$user_id` checks do not help
(and may tangentially be broken anyways.)
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6323>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list