Thanks for the excellent questions.highfive wrote:I am creating a few custom roles for my blogs. I need someone who can add new users (Editors $ Contributors), but not have rights to mess with plugins, themes etc. It is basically and Editor+ user with a few extra capabilities.
As soon as I give this role the built in wordpress create_users capability, they suddenly have access to all of the s2member options. Ack! Certainly creating users is going to be tied somewhat to s2member, but that's a little over kill.
Also, another issue this is exposing is that I need to add users who aren't 's2Member' users. Just regular old Author's, etc. However, s2Member has hijacked the add user functionality and assumes every user I want to add is going to be an s2Member user.
Your first question about the
create_users Capability. Yes, s2Member's administrative menu is designed to run based on this Capability that is normally associated with Administrators of the site. However, s2Member does make it possible to fine tune this behavior if you like. You can do this through the application of Filters for WordPress. For instance, if you don't want to show the s2Member menu panels to certain Roles, you might do something like this:
Create this directory and file:/wp-content/mu-plugins/s2-hacks.php
- Code: Select all
<?php
add_action ("init", "disable_s2_menu", 1);
function disable_s2_menu ()
{
if (current_user_is ("contributor"))
add_filter ("ws_plugin__s2member_during_add_admin_options_create_menu_items", "__return_false");
}
?>
* If you run a search against s2Member's source code for:
ws_plugin__s2member_during_add_admin_options_create_menu_items, you will find that you can also Filter out only certain aspects of s2Member menu as well, using a similar approach
( i.e. there are other Filter Hooks available in the source code ).
Also, another issue this is exposing is that I need to add users who aren't 's2Member' users. Just regular old Author's, etc. However, s2Member has hijacked the add user functionality and assumes every user I want to add is going to be an s2Member user.
Hmm. Not sure what you mean by this. s2Member does add a section to the New User section of your Dashboard, but you can still choose whichever Role you prefer, including those that are part of the WordPress core. If they aren't going to be a Member, just leave all of the s2Member fields empty