Community Support Forums — WordPress® ( Users Helping Users ) — 2011-03-25T10:50:28-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=2794 2011-03-25T10:50:28-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2794&p=8340#p8340 <![CDATA[Re: Profile Page With Subscription Level?]]>
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:
<?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

Statistics: Posted by man-O-media — March 25th, 2011, 10:50 am


]]>
2011-03-23T15:48:56-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2794&p=8220#p8220 <![CDATA[Profile Page With Subscription Level?]]> Statistics: Posted by NickB — March 23rd, 2011, 3:48 pm


]]>