[buddypress-trac] [BuddyPress Trac] #7096: Messages: member page messages are queried for the loggedin user
buddypress-trac
noreply at wordpress.org
Tue Jun 6 13:43:10 UTC 2017
#7096: Messages: member page messages are queried for the loggedin user
--------------------------+----------------------------------
Reporter: Offereins | Owner: dcavins
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: Under Consideration
Component: Messages | Version:
Severity: normal | Resolution:
Keywords: has-patch |
--------------------------+----------------------------------
Comment (by dcavins):
@r-a-y: I'm looking at this patch again today, and I like your idea of
adding the `bp_moderate` check in `messages_check_thread_access()`, but
it will change the return value of `messages_check_thread_access()`.
(Which I think is why I left the `bp_moderate` check outside of it--
because I didn't quite know what to do with it.)
`messages_check_thread_access()` actually returns the ID of the record in
the `bp_messages_recipients`, so what would we return for a site admin
who's not in the thread?
For instance, if I run `messages_check_thread_access( 13, 1 )`, this row
is found:
{{{
id user_id thread_id unread_count sender_only is_deleted
29 1 13 0 0 0
}}}
and the integer `29` is the return value.
Do you think anyone is using this function to fetch that ID? Would it be
safe to return `true` for admins?
Thanks!
-David
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/7096#comment:19>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list