Skip to:
Content
Pages
Categories
Search
Top
Bottom

Admin Check Suggestion

  • Avatar of techguy
    techguy
    Participant

    @crashutah

    Right now your admin check is `if( $bp->loggedin_user->is_site_admin == 1 )`

    This is great if your admin is sending a PM through the regular BP messaging interface. Unfortunately, this doesn’t cover when a plugin is sending a PM from the admin to a user. I’d suggest you add a check if $message_info->sender_id is a site admin and this will solve the problem. That way plugins can send from the site admin users without getting blocked by the plugin.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Avatar of r-a-y
    r-a-y
    Moderator

    @r-a-y

    @techguy – Good call. Thanks for the suggestion.

    When I wrote the plugin, I wasn’t thinking about external plugins!
    Will make its way into the next release.

    Avatar of techguy
    techguy
    Participant

    @crashutah

    Today I’ve been thinking of times when I might want to allow a user to use a plugin to send a message to someone who may not have accepted their friend request. So, if you can think of a way for plugins to make individual exceptions that would be cool too.

    In my case I want to allow users that referred someone to be able to send them a thank you PM regardless of whether the person who joined has accepted the friendship request or not. I guess I might be able to override your action call….hmmm.

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

You must be logged in to reply to this topic.