latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

How Do I present JUST member info to Members

Home Forums Community Forum How Do I present JUST member info to Members

This topic contains 2 replies, has 2 voices. Last updated by  Dedoceo habi 3 years, 7 months ago.

Topic Author Topic
Posted: Thursday May 9th, 2013 at 2:52 pm #49605
Dedoceo habi
Username: Dedoceo

Hi,

I’ve been trying to figure out how to present member profile information to a member once he/she logs in. I’ve been unable to do so… I can get what I want but only with the shortcode [profile person=dedoceo-habi]. This will not work if I have 100 members… I want s2Member to get the login information and present that members information on the My Account Page…

Please help…

List Of Topic Replies

Viewing 2 replies - 1 through 2 (of 2 total)
Author Replies
Author Replies
Posted: Friday May 10th, 2013 at 9:12 am #49686

Greetings Dedoceo,

I’ve built my own Account Page using s2Member Scripting using Php, although Shortcode would work just as well. Here is the basic concept that we use.

<?php if (S2MEMBER_CURRENT_USER_ACCESS_LEVEL >= 0){ ?>
    			
	<p><strong>Account Username:</strong> <?php echo S2MEMBER_CURRENT_USER_LOGIN; ?></p> 
    				
	<p><strong>Account Email Address:</strong> <?php echo S2MEMBER_CURRENT_USER_EMAIL; ?></p>
    				
	<p><strong>Account Registered:</strong> <?php echo S2MEMBER_CURRENT_USER_REGISTRATION_DAYS; ?> Days ago</p>
    				
	<p><strong>Account ID Number:</strong> <?php echo S2MEMBER_CURRENT_USER_ID; ?></p>
    				
	<p><strong>Member Name:</strong> <?php echo S2MEMBER_CURRENT_USER_FIRST_NAME; ?> <?php echo S2MEMBER_CURRENT_USER_LAST_NAME; ?></p>
    				
	<p><strong>Membership Level:</strong> <?php echo S2MEMBER_CURRENT_USER_ACCESS_LABEL; ?></p>
   					
	<p><strong>Membership ID Number:</strong> <?php echo S2MEMBER_CURRENT_USER_SUBSCR_ID; ?></p>	
 	
<?php } else if(S2MEMBER_CURRENT_USER_ACCESS_LEVEL === -1){ ?>

	<!-- Redirect users who are not logged in, to the Login Page -->

    	<script type="text/javascript">
		window.location = 'http://www.example.com/login/';
	</script>
	 			
<?php } ?>

We’ve put in some more details (I can’t share here, for security reasons) but this is generally the way it works. We’ve then put this code (or the shortcode equivalents) into a page, and so that whenever someone visits the page, their account information is displayed, or they’re redirected away to the Login Page, if they’re not logged in.

Hope that helps!

Posted: Wednesday May 22nd, 2013 at 7:59 am #50365
Dedoceo habi
Username: Dedoceo

Hi,

Thanks for the information… I’ll try it out and see what happens… I also want members to be able to add their photo (and edit when they want) to their profile… do you have any information on that?

Viewing 2 replies - 1 through 2 (of 2 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.