latest stable versions: v141007 (changelog)

s2Member® Roles/Capabilities

A Quick Overview — What are Roles/Capabilities?

When you install s2Member®, it integrates seamlessly with an existing WordPress® concept that facilitates varying degrees of permission across different portions of a site or service (including the back-end of WordPress® itself). So Roles/Capabilities are NOT something new that s2Member® introduces, it simply works with and customizes an existing WordPress® community concept.

For example, you probably already know that site owners are normally WordPress® Administrators. A WordPress “Administrator” being your Role on the site. This Administrator Role grants you the ability to do certain things, because it includes many different Capabilities (like edit_posts, install_plugins, etc).

To learn more about Roles/Capabilities in the WordPress® core, please see this article in the WP Codex.

s2Member® Roles/Capabilities (Including bbPress® Support)

When you install s2Member® it adds some additional Roles and Capabilities to a default installation of WordPress®. s2Member® also makes extensive use of an existing Role in WordPress, the Subscriber Role. s2Member uses the Subscriber Role to classify Free Subscribers (i.e. people with an account — but they’ve not paid you anything yet). Or, maybe they HAVE paid you for something in the past, but they were since demoted back down to the Subscriber Role (so they no longer have Membership privileges, or Capabilities I should say).

Membership Levels Provide Incremental Access
  • A Member with Level 4 access, will also be able to access Levels 0, 1, 2 & 3.
    WordPress® Role: s2member_level4

    WordPress® Capabilities:
    read, level_0
    access_s2member_level0
    access_s2member_level1
    access_s2member_level2
    access_s2member_level3
    access_s2member_level4

  • A Member with Level 3 access, will also be able to access Levels 0, 1 & 2.
    WordPress® Role: s2member_level3

    WordPress® Capabilities:
    read, level_0
    access_s2member_level0
    access_s2member_level1
    access_s2member_level2
    access_s2member_level3

  • A Member with Level 2 access, will also be able to access Levels 0 & 1.
    WordPress® Role: s2member_level2

    WordPress® Capabilities:
    read, level_0
    access_s2member_level0
    access_s2member_level1
    access_s2member_level2

  • A Member with Level 1 access, will also be able to access Level 0.
    WordPress® Role: s2member_level1

    WordPress® Capabilities:
    read, level_0
    access_s2member_level0
    access_s2member_level1

  • A Subscriber with Level 0 access, will ONLY be able to access Level 0.
    WordPress® Role: subscriber

    WordPress® Capabilities:
    read, level_0
    access_s2member_level0

  • A public Visitor will have NO access to protected content.

WordPress® Subscribers are at Membership Level 0. If you’re allowing Open Registration, Subscribers will be at Level 0 (a Free Subscriber). WordPress® Administrators, Editors, Authors, and Contributors have Level 4 access, with respect to s2Member. All of their other Roles/Capabilities are left untouched.

Membership Levels Provide Incremental Access

s2Member configures your Membership Roles (by default, these include: s2Member Level 1, s2Member Level 2, s2Member Level 3, s2Member Level 4), with a default set of bbPress® permissions that allow all Members to both spectate and participate in your forums, just as if they were a WordPress® Subscriber Role (and/or a bbPress® Participant Role).

bbPress® also adds some new Roles (dynamic Roles in bbPress® 2.2+) to your WordPress® installation. These include but are not limited to: Keymaster and Moderator. s2Member allows Forum Keymasters & Moderators full access to the highest Membership Level you offer; just like it does with Administrators, Editors, Authors, and Contributors.

  • A Member with Level 4 access, will also be able to access Levels 0, 1, 2 & 3.
    Members with Level 4 access can also spectate/participate in bbPress® Forums.
    WordPress® Role: s2member_level4

    WordPress® Capabilities:
    read, level_0
    access_s2member_level0
    access_s2member_level1
    access_s2member_level2
    access_s2member_level3
    access_s2member_level4

    bbPress® Capabilities:
    spectate
    participate
    read_private_forums
    publish_topics
    edit_topics
    publish_replies
    edit_replies
    assign_topic_tags

  • A Member with Level 3 access, will also be able to access Levels 0, 1 & 2.
    Members with Level 3 access can also spectate/participate in bbPress® Forums.
    WordPress® Role: s2member_level3

    WordPress® Capabilities:
    read, level_0
    access_s2member_level0
    access_s2member_level1
    access_s2member_level2
    access_s2member_level3

    bbPress® Capabilities:
    spectate
    participate
    read_private_forums
    publish_topics
    edit_topics
    publish_replies
    edit_replies
    assign_topic_tags

  • A Member with Level 2 access, will also be able to access Levels 0 & 1.
    Members with Level 2 access can also spectate/participate in bbPress® Forums.
    WordPress® Role: s2member_level2

    WordPress® Capabilities:
    read, level_0
    access_s2member_level0
    access_s2member_level1
    access_s2member_level2

    bbPress® Capabilities:
    spectate
    participate
    read_private_forums
    publish_topics
    edit_topics
    publish_replies
    edit_replies
    assign_topic_tags

  • A Member with Level 1 access, will also be able to access Level 0.
    Members with Level 1 access can also spectate/participate in bbPress® Forums.
    WordPress® Role: s2member_level1

    WordPress® Capabilities:
    read, level_0
    access_s2member_level0
    access_s2member_level1

    bbPress® Capabilities:
    spectate
    participate
    read_private_forums
    publish_topics
    edit_topics
    publish_replies
    edit_replies
    assign_topic_tags

  • A Subscriber with Level 0 access, will ONLY be able to access Level 0.
    Members with Level 0 access can also spectate/participate in bbPress® Forums.
    WordPress® Role: subscriber

    WordPress® Capabilities:
    read, level_0
    access_s2member_level0

    bbPress® Capabilities:
    spectate
    participate
    read_private_forums
    publish_topics
    edit_topics
    publish_replies
    edit_replies
    assign_topic_tags

  • A public Visitor will have NO access to protected content (and no access to bbPress® Forums).

WordPress® Subscribers and bbPress® Spectators/Participants are at Membership Level 0. If you’re allowing Open Registration via s2Member, Subscribers will be at Level 0 (a Free Subscriber).

WordPress® Administrators, Editors, Authors, Contributors, and bbPress® Keymasters/Moderators have Level 4 access, with respect to s2Member. All of their other Roles/Capabilities are left untouched.

Modifying s2Member® Roles/Capabilities

If you would like to modify the default Roles/Capabilities that s2Member® works with, you might give this plugin a shot. Please see this plugin at WordPress.org: Enhanced Capability Manager.

However (please NOTE): s2Member® Support Reps will NOT offer support for a site that is running modified Roles/Capabilities. If you customize your installation, you will be responsible for debugging anything that may not be working as expected. Please see our Support Policy for some clarification on this.

If you DO modify your Roles/Capabilities, please be sure to install this hack to prevent s2Member® from resetting your customization in the future, should you attempt to update your copy of s2Member® or s2Member® Pro. This will lock-in your customizations; telling s2Member® NOT to reset your Roles/Capabilities during future plugin updates.

Please create this directory and file:
/wp-content/mu-plugins/s2-hacks.php
(NOTE: these are MUST USE plugins, see: http://codex.wordpress.org/Must_Use_Plugins)
(See also: http://www.s2member.com/kb/hacking-s2member/)

<?php
add_filter('ws_plugin__s2member_lock_roles_caps', '__return_true');

Other Related Articles (Suggested Reading)
See: Dashboard -› s2Member® -› General Options -› Membership Levels/Labels

See: Simple Shortcode Conditionals (How-To Article)

See: Dashboard -› s2Member® -› API / Scripting -› Advanced PHP Conditionals
See: Dashboard -› s2Member® -› API / Scripting -› Advanced PHP Query Conditionals
See: Dashboard -› s2Member® -› API / Scripting -› Custom Capabilities (Packages)

See also: WordPress® Conditional Tags and s2Member® API Functions
See also: WordPress® Roles/Capabilities and bbPress® Roles/Capabilities
See also: Video » Extending s2Member® w/ Custom Capabilities (moving away from Levels)

About the Author

Jason (Lead Developer)Yep, I'm one of those oddball coders! When I'm not coding, I'm thinking about code, or helping others with code. Heck, sometimes my dreams are in the PHP language :-) It's been a passion of mine for 12+ years now.View all posts by Jason (Lead Developer) →

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.