PriMoThemes — now s2Member® (official notice)

This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™

New registered user can only change profile info, cant post

s2Member Plugin. A Membership plugin for WordPress®.

New registered user can only change profile info, cant post

Postby ondrje » July 27th, 2010, 8:31 am

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
User avatar
ondrje
Registered User
Registered User
 
Posts: 1
Joined: July 27, 2010

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

Postby g » July 28th, 2010, 5:52 am

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 ());
g
Guest User
Guest User
 

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

Postby Jason Caldwell » July 28th, 2010, 6:26 am

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.
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA


Return to s2Member Plugin

Who is online

Users browsing this forum: Google [Bot], Yahoo [Bot] and 2 guests

cron