Skip to:
Content
Pages
Categories
Search
Top
Bottom

Require user to be a friend to send messages


  • modemlooper
    Moderator

    @modemlooper

    You can pretty much message anyone on the site. Is there a way to only allow friends to message each other?

Viewing 7 replies - 1 through 7 (of 7 total)

  • Arun
    Participant

    @sparun

    If you are talking about your installation somewhere ,you can easily turn it off (if you are a admin) from the “Buddypress” submenu under the “Site Admin” menu.there is an option “Allow non-friends to post on profile wires:”. you can select “no” for that.

    But if you are talking about this buddypress.org site, Andy may think that this feature can be very useful for developers (like us) for contacting each other without having to wait for the invitation accept.

    and Don’t forget to turn those Lights OFF.(only if this answers your Question)


    Burt Adsit
    Participant

    @burtadsit

    lol. This turning off the lights when you leave the room campaign is catching on. We should give modemlooper a chance to do it himself. Practice makes perfect when it comes to habits.

    The answer is no.


    modemlooper
    Moderator

    @modemlooper

    Lights back on

    I see that you cant post to a wire via this option but you still can message people who are not friends. I can go to anyone’s profile and click the send message button. Is there a way to stop non friends from messaging you?

    I can see this being used to spam members.


    mesgains
    Participant

    @mesgains

    you have to put thoses lines in your wp-content/member-themes/buddypress-member/profile/profile.php to make it work like you want

    you add this test :

    <? global $bp;

    if ( ‘is_friend’ == BP_Friends_Friendship::check_is_friend( $bp->loggedin_user->id, $bp->displayed_user->id ) ) {

    ?>

    before thoses line

    <?php if ( function_exists(‘bp_send_message_button’) ) : ?>

    <?php bp_send_message_button() ?>

    <?php endif; ?>

    end then close the test

    <? } ?>


    modemlooper
    Moderator

    @modemlooper

    Perfect! turning out light


    nicolagreco
    Participant

    @nicolagreco

    you could write a function to add at the action that sends messages, i’ll look at the code and write smtingh for you, i don’t like hacking code, just plug it :)


    mesgains
    Participant

    @mesgains

    a function is better… you’re rigth

    ;)

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Require user to be a friend to send messages’ is closed to new replies.
Skip to toolbar