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™

Using s2Member with WPMU

s2Member Plugin. A Membership plugin for WordPress®.

Using s2Member with WPMU

Postby jannesh » May 19th, 2010, 9:43 am

Hi

I am busy developing a plugin for a WPMU site and I want to use the s2Member plugin to limit access to certain features, however I am having a few problems.

Basically the WPMU site will have two types of users, free users and paid users. Both of these user types will be able to publish blogs, but I want certain options for my new plugin to be disabled for free users.

The problem is, when I am logged in as a non-site-admin user onto the WPMU site, the s2Member API does not work.

I inserted the following code into the admin page for my plugin:
Code: Select all
   echo "user_login:"; print_r($user_login); echo "<br>";
   echo "S2MEMBER_VERSION:".S2MEMBER_VERSION."<br>";
   echo "S2MEMBER_CURRENT_USER_ACCESS_LEVEL:".S2MEMBER_CURRENT_USER_ACCESS_LEVEL."<br>";
   echo "access_s2member_level3:".current_user_can ("access_s2member_level3")."<br>";


If I refresh the plugin's option page on a normal (non-MU) site I get the following:
Code: Select all
user_login:admin
S2MEMBER_VERSION:3.0
S2MEMBER_CURRENT_USER_ACCESS_LEVEL:4
access_s2member_level3:1

Which is what I would expect.

If I refresh the plugin's option page on a WPMU site, while logged in as site-admin, I get the following:
Code: Select all
user_login:admin
S2MEMBER_VERSION:S2MEMBER_VERSION
S2MEMBER_CURRENT_USER_ACCESS_LEVEL:4
access_s2member_level3:1

Notice that the S2MEMBER_CURRENT_USER_ACCESS_LEVEL is still 4 (all admin account are 4) and access_s2member_level3 is true, but S2MEMBER_VERSION is not defined anymore.

If I refresh the plugin's option page on a WPMU site, while logged in as a user, I get the following:
Code: Select all
user_login:test
S2MEMBER_VERSION:S2MEMBER_VERSION
S2MEMBER_CURRENT_USER_ACCESS_LEVEL:S2MEMBER_CURRENT_USER_ACCESS_LEVEL
access_s2member_level3:

Now S2MEMBER_CURRENT_USER_ACCESS_LEVEL is also not defined and access_s2member_level3 is false. This is even the case if I change the role of the 'test' user to 's2Member Level 3'.

So, the question is: "Is it possible to get the s2Member level of a WPMU user on the user-blog level, and if so, how?"

I am using:
Wordpress 2.9.2
Wordpress MU 2.9.2
s2Member 2.9.3
Budypress 1.2.3

I am prepared to go dig about for code, so all help will be appreciated.

Thanks
JannesH
User avatar
jannesh
Experienced User
Experienced User
 
Posts: 12
Joined: May 19, 2010

Re: Using s2Member with WPMU

Postby jannesh » May 25th, 2010, 3:48 am

Hi

Still looking for a solution here, or is it not possible?

JannesH
User avatar
jannesh
Experienced User
Experienced User
 
Posts: 12
Joined: May 19, 2010

Re: Using s2Member with WPMU

Postby Jason Caldwell » June 24th, 2010, 12:27 am

Hi JannesH. Very sorry for my extremely delayed reponse.
No, you are correct. This is NOT possible with s2Member, not yet.
We were awaiting the release of WP 3.0 with Multisite support before we spent too much time on this.
Now that's it's out, work is already underway on compatiblity with WP 3.0 /w Multisite networking enabled.
s2Member is already compatible with WP 3.0, but not with Multisite networking enabled, not yet.
~ 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] and 2 guests

cron