Page 1 of 1

New registered user can only change profile info, cant post

PostPosted: July 27th, 2010, 8:31 am
by ondrje
Hello,
one question about posting new posts with user registered with s2member.
After registration (s2Member Level 2) using paypal, and logging in, user cannot create any new posts. (can
only change profile information). Another words - user has just a visitor level.

Is it possible also to be able to post new posts?
Have a nice day,
ondrej

Re: New registered user can only change profile info, cant p

PostPosted: July 28th, 2010, 5:52 am
by g
Hi,
the answer lies in: \plugins\s2member\includes\functions\register-access.inc.php
On the row 26, change the default role to "contributor"


return apply_filters ("ws_plugin__s2member_force_default_role", ($default_role = "contributor"), get_defined_vars ());

Re: New registered user can only change profile info, cant p

PostPosted: July 28th, 2010, 6:26 am
by Jason Caldwell
Awesome. It's great to see help from others on the board here.

Just to point out, try to use Hooks/Filters when you can. That way you won't have to modify the source over and over again; each time a new version of s2Member is released.

So something like this goes into the functions.php file for your WordPress theme:
Code: Select all
add_filter("ws_plugin__s2member_force_default_role", "default_role");
function default_role($role){
return "contributor";
}

This way you're not editing the s2Member source files directly, and the change that you made will survive an upgrade of the s2Member plugin through your WP Dashboard in the future.