Skip to:
Content

BuddyPress.org

Ticket #5319: buddypress-functions.php.patch

File buddypress-functions.php.patch, 574 bytes (added by megainfo, 11 years ago)

Patch for Legacy template

  • buddypress-functions.php

     
    979979        // Cast fid as an integer
    980980        $friend_id = (int) $_POST['fid'];
    981981
     982        // Prevent POST request from member to himself
     983        if ( bp_loggedin_user_id() == $friend_id )
     984                exit();
     985       
    982986        // Trying to cancel friendship
    983987        if ( 'is_friend' == BP_Friends_Friendship::check_is_friend( bp_loggedin_user_id(), $friend_id ) ) {
    984988                check_ajax_referer( 'friends_remove_friend' );