Skip to:
Content
Pages
Categories
Search
Top
Bottom

Require user to be a friend to send messages

  • @modemlooper

    Moderator

    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)
  • @sparun

    Participant

    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)

    @burtadsit

    Participant

    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

    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

    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

    Perfect! turning out light

    @nicolagreco

    Participant

    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

    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