Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
06/17/2019 05:43:50 PM (4 years ago)
Author:
imath
Message:

Make sure Messages exports only include the ones sent by the user

Using the $user->ID instead of the $recipients->ID to check for the sender ID is more reliable to make sure the generated zip Archive only contains messages sent by the requesting user.

Props gingerbooch, Venutius

Fixes #8080 (trunk)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-messages/bp-messages-functions.php

    r12180 r12403  
    685685        foreach ( $thread->messages as $message_index => $message ) {
    686686            // Only include messages written by the user.
    687             if ( $recipient->user_id !== $message->sender_id ) {
     687            if ( $user->ID !== $message->sender_id ) {
    688688                continue;
    689689            }
Note: See TracChangeset for help on using the changeset viewer.