Page 1 of 1

Can my members have AUTHOR capability?

PostPosted: January 25th, 2012, 4:44 pm
by scottfennell
Hi,

I just installed and configured this great plugin. I think it will be a great solution, but I'm stuck on one thing.

When users register for my site, I need them to have the Wordpress AUTHOR capability (they need to be able to post in two different custom post types, edit their own posts, delete their own posts, and of course edit theire profile).

I'm just not seeing how to do this.

Currently, all they are able to do is edit their profile. S2 "takes control" of wp-admin-->general settings-->new default user role, setting it to SUBSCRIBER, when I need it to be AUTHOR.

This is what I've attempted so far (in my theme-->functions.php):

Code: Select all
add_action('admin_init', 'empower_users');
function empower_users()
{
$role = get_role( 's2member_level4' );

$role->add_cap( 'pubish_post' );
$role->add_cap( 'edit_post' );
}


It doesn't work; it doens't appear to do anything.

Re: Can my members have AUTHOR capability?

PostPosted: January 26th, 2012, 12:15 pm
by scottfennell
Well, I was able to edit the roles using the User Role Editor plugin.

I'm not sure what I was doing wrong with my code above.

It's really quite silly that S2member spends so much time belaboring the point about different user levels (I spent an hour watching videos on the topic yesterday), only to give no native way for me to edit their admin capabilites (post, edit, delete, upload, etc).

Why not include this?

Re: Can my members have AUTHOR capability?

PostPosted: January 26th, 2012, 6:12 pm
by Cristián Lávaque
Hi Scott.

s2Member only manages user access to the content on the front end, it doesn't manage the back end of WP at all. There are different reasons why we didn't choose to add this yet, and it isn't promoted as such.

That said, when someone asks how to do that, we usually tell them they can edit the user roles with User Role Editor like you did, but that's the site owner's responsibility to customize and make sure it doesn't have security problems.

Maybe we should make a clear statement about s2Member not managing access to the admin area. Thanks a lot for pointing it out. :)

Re: Can my members have AUTHOR capability?

PostPosted: January 26th, 2012, 6:30 pm
by scottfennell
I think that would be appropriate. Thanks for the response.