Skip to:
Content
Pages
Categories
Search
Top
Bottom

Target per-forum moderators


  • bttmrc
    Participant

    @bttmrc

    Hello,

    I want two types of forums in my website: One for courses and another more general.

    Users/participants can’t create topics. Only answer on pre-existing topics created by admins, full moderators or per-forum moderators.

    I can achieve this with user roles, but is there a user role for per forum moderator I can target? I don’t know how to code, I have a function Im messing around with.

    Basically if user is per-forum moderator of that forum allow to create topics.
    If not, don’t allow

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

  • Robin W
    Moderator

    @robin-w

    there is a function

    bbp_is_user_forum_moderator

    so a stament like

    if (bbp_is_user_forum_moderator()) {
    
    //do something
    }

    or if you need to pass user_id or forum_id

    if (bbp_is_user_forum_moderator( $user_id, $forum_id)) {
    
    //do something
    }

    bttmrc
    Participant

    @bttmrc

    Well sir, you are nothing short of amazing.

    It worked perfectly as far as I tested


    Robin W
    Moderator

    @robin-w

    great – glad you are fixed !!

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Skip to toolbar