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™

Profile Page With Subscription Level?

s2Member Plugin. A Membership plugin for WordPress®.

Profile Page With Subscription Level?

Postby NickB » March 23rd, 2011, 3:48 pm

Can members access some sort of profile page which lists their current subscription level along with other general profile info?
User avatar
NickB
Registered User
Registered User
 
Posts: 1
Joined: March 23, 2011

Re: Profile Page With Subscription Level?

Postby man-O-media » March 25th, 2011, 10:50 am

Hi Nick,

I'm not quite sure what you mean but if you simply want to have a display on the profile page that tells the user what level they have, there are some constants you can use in your proile page template:

Have a look at this from the API scripting page:
S2MEMBER_CURRENT_USER_ACCESS_LEVEL
This will always be (int) -1 thru 4. -1 if not logged in. 0 if logged in as a Free Subscriber.

Code: Select all
<?php if (S2MEMBER_CURRENT_USER_ACCESS_LEVEL === 4){ ?>
    A Member has an Access Level of 4.
<?php } else if (S2MEMBER_CURRENT_USER_ACCESS_LEVEL === 3){ ?>
    A Member has an Access Level of 3.
<?php } else if (S2MEMBER_CURRENT_USER_ACCESS_LEVEL === 2){ ?>
    A Member has an Access Level of 2.
<?php } else if (S2MEMBER_CURRENT_USER_ACCESS_LEVEL === 1){ ?>
    A Member has an Access Level of 1.
<?php } else if(S2MEMBER_CURRENT_USER_ACCESS_LEVEL === 0){ ?>
    A User is logged in as a Free Subscriber.
<?php } else if(S2MEMBER_CURRENT_USER_ACCESS_LEVEL === -1){ ?>
    A User is not logged in at all.
<?php ?>


There are also Shortcodes and there is a mass of other info as well on that page.

Daine
User avatar
man-O-media
Experienced User
Experienced User
 
Posts: 117
Joined: February 10, 2011


Return to s2Member Plugin

Who is online

Users browsing this forum: Bing [Bot] and 1 guest

cron