Skip to:
Content
Pages
Categories
Search
Top
Bottom

request of friend

  • @jennifersanchez

    Participant

    Hi!
    I have this code to add automatic the friend without the user accept the request.
    But it isnt working, any suggest?
    Thanks very much!

    function bp_auto_accept_friend_request( $friendship_id, $friendship_initiator_id, $friendship_friend_id ) {
            $friendship_status = BP_Friends_Friendship::check_is_friend( $friendship_initiator_id, $friendship_friend_id );
            if ( 'not_friends' == $friendship_status )  {
                // force add
                friends_add_friend( $friendship_initiator_id, $friendship_friend_id, true );
                friends_accept_friendship( $friendship_id );
            
            }
        }
        add_action('friends_friendship_requested', 'bp_auto_accept_friend_request', 200, 3);
Viewing 2 replies - 1 through 2 (of 2 total)
  • @dopeboy

    Participant

    I need this solution. There isn’t an option for this in the admin end. Also cant find how to play with this problem in the codex.

    Any expert willing to help out here?

    @jennifersanchez

    Participant

    @dopeboy did you can it?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘request of friend’ is closed to new replies.
Skip to toolbar