[buddypress-trac] [BuddyPress Trac] #7235: Allow for message threads to be deleted for users other than the current user
buddypress-trac
noreply at wordpress.org
Mon Aug 29 22:10:21 UTC 2016
#7235: Allow for message threads to be deleted for users other than the current
user
-------------------------+------------------------------
Reporter: jdgrimes | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Messages | Version:
Severity: normal | Resolution:
Keywords: has-patch |
-------------------------+------------------------------
Changes (by jdgrimes):
* keywords: => has-patch
Comment:
[attachment:7235.diff] is a first pass. I've added an optional `$user_id`
parameter to `BP_Messages_Thread::delete()` and
`messages_delete_thread()`, and to action hooks that they call where I
felt that it was appropriate.
While working on this I realized that there could be back-compat issues
with any functions hooked to those actions that will be assuming that the
messages are being deleted for the logged-in user. I guess the only way to
work around that would be to hack the current user when calling those
actions, and then reset it afterward. Possibly then we'd also want to
deprecate them and introduce new actions that preserve the current user
when they are called. I guess this really could be an insurmountable
obstacle to ever fixing this without introducing new functions with new
actions.
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/7235#comment:1>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list