• Resolved tech-pc

    (@tech-pc)


    I have WP 4.3.1 with BBpress 2.5.8 & WP-Members.

    I need to give “moderators” the ability to activate users.

    How can this be accomplished?
    (without giving them more than the normal moderator priveledges + activating users)

    I tried “Capability Manager Enhanced” plugin to no avail, unless I did something wrong – entirely possible.

    Please help- this is the last missing piece to my forum before going live. Thanks in Advance

    https://www.ads-software.com/plugins/capability-manager-enhanced/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter tech-pc

    (@tech-pc)

    Is This Plugin still supported? or has it gone defunct?

    Plugin Author Kevin Behrens

    (@kevinb)

    Keep in mind that this plugin’s purpose is to conveniently view and modify the capabilities array stored for each WordPress role. It is not responsible for the implementation of those capabilities by the WordPress core or other plugins.

    I do not have a ready answer to your particular implementation. It sounds like WordPress or bbPress places some limitations on the function of user capabilities. I will let you know if I find some time to donate to this investigation.

    Plugin Author Kevin Behrens

    (@kevinb)

    What do you mean by “activate users” ?

    Is this a multisite installation? Does this pertain to the Manage Signups screen provided by bbPress?

    Plugin Author Kevin Behrens

    (@kevinb)

    Alright, I’ve taken the time to install the WP-Members plugin and work through a sample configuration. I then searched that plugin’s source code to determine that the following capabilities are needed to activate users:

    • membershipadmindashboard
    • membershipadminmembers

    If you add those capabilities to a regular WordPress role (such as Editor) you’ll see that Membership menu and “All Members” submenu appear in their dashboard.

    You have stated the additional requirement of adding these capabilities via a supplemental bbPress Moderator role. Since bbPress semi-hardcodes its role definitions, the role definitions stored to your wp_options table (and exposed by CME) are not applied by default. To make bbPress use your customized Moderator role capabilities, you will need some additional code to hook into the ‘bbp_get_caps_for_role’ filter. Something like this:

    add_filter( 'bbp_get_caps_for_role', 'pp_bbp_role_caps', 5, 2 );
    function pp_bbp_role_caps( $caps, $role ) {
      if ( 'bbp_moderator' == $role ) {
         $caps['membershipadmindashboard'] = true;
         $caps['membershipadminmembers'] = true;
      }
    }

    With my pro plugin active, CME customizations to bbPress role capabilities are enforced in this way. But since I need some compensation for the potential support liability of future third party changes, I’ve chosen not to touch this in the free plugin releases.

    I hope this illustrates what I mean by me not taking primary support responisibility for the ultimate effect of every knob which my plugin exposes. You are right that I should have replied in some manner. But maybe you can see how your “simple question” really isn’t, and how even a “give me time to look into it” answer implies a commitment on my part to install, configure and review unfamiliar third party code.

    Plugin Author Kevin Behrens

    (@kevinb)

    A correction to the code snippet I posted:

    add_filter( 'bbp_get_caps_for_role', 'my_bbp_role_caps', 5, 2 );
    function my_bbp_role_caps( $caps, $role ) {
      if ( 'bbp_moderator' == $role ) {
         $caps['membershipadmindashboard'] = true;
         $caps['membershipadminmembers'] = true;
      }
    
      return $caps;
    }
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to Give Moderators ability to activate users’ is closed to new replies.