Hello, I am trying to use the logged in members email address to include in a third party application launched from within the Ning application so members don't need to log in twice. Can you advise how I can "call" the logged in members email address in this regard. See the sample script below where $USERID needs to be replaced with their email address from the Ning database.
<iframe src="http://www.masterscoreboard.co.uk/ListOfCompetitions.php?CWID=XX XX&CUID=<?php echo $USERID; ?>" width="100%" height="590" frameborder="0" scrolling="yes" id="abc" name="abc"></iframe>
Thank you for your help in advance!
The email address for a signed in member isn't available to include in this type of situation. However, if you have a Pro network, you could include their screenName, which the third party server could use, in conjunction with the Ning API, to look up the member and retrieve their email address. You would need to update the string you called like this:
var framesrc = "http://www.masterscoreboard.co.uk/ListOfCompetitions.php?CWID=XX XX&CUID=" + Ning.CurrentProfile.id;
And then use the Ning API at the third party server to take the value for CUID and look up the member's email address. You would need to assume that the value for CUID could be null, since it would be null for non-members. Also note that this method isn't completely secure; someone could tweak the value for the CUID on their client, so you might want to design your solution with that in mind.
I think this is going to help a great deal. Thankyou so much for your time and knowledge!