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™

call member email in form field

s2Member Plugin. A Membership plugin for WordPress®.

call member email in form field

Postby antseo » December 3rd, 2011, 10:08 pm

What is the code (either php or s2member short code) to add in a member's email address that is logged into the site? I want place it in a form field in another plugin.
User avatar
antseo
Experienced User
Experienced User
 
Posts: 127
Joined: September 2, 2011

Re: call member email in form field

Postby Cristián Lávaque » December 4th, 2011, 2:43 am

Try S2MEMBER_CURRENT_USER_EMAIL. WP Admin -> s2Member -> API / Scripting -> s2Member PHP/API Constants -> S2MEMBER_CURRENT_USER_EMAIL

S2MEMBER_CURRENT_USER_EMAIL
This will always be a (string) containing the current User's Email Address. Empty if not logged in.

<?php echo S2MEMBER_CURRENT_USER_EMAIL; ?>
This may output something like: johnsmith@example.com
( or whatever their email address is )

---- s2member Shortcode Equivalent ----

[s2Get constant="S2MEMBER_CURRENT_USER_EMAIL" /]


I hope it helps. :)
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010


Return to s2Member Plugin

Who is online

Users browsing this forum: Yahoo [Bot] and 0 guests

cron