Skip to:
Content

BuddyPress.org

Ticket #7113: 7113.patch

File 7113.patch, 616 bytes (added by imath, 4 years ago)
  • src/bp-activity/bp-activity-screens.php

    diff --git src/bp-activity/bp-activity-screens.php src/bp-activity/bp-activity-screens.php
    index bede7dc..f51fb17 100644
    function bp_activity_screen_single_activity_permalink() { 
    222222                $activity = $activity['activities'][0];
    223223        }
    224224
     225        // Redirect to the Activity author's profile if current does not match
     226        if ( (int) bp_displayed_user_id() !== (int) $activity->user_id ) {
     227                bp_core_redirect( bp_activity_get_permalink( $activity->id, $activity ) );
     228        }
     229
    225230        // Default access is true.
    226231        $has_access = true;
    227232