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.

Getting User Registration Data From S2Member

Home Forums Community Forum Getting User Registration Data From S2Member

This topic contains 9 replies, has 2 voices. Last updated by  David Welch 4 years, 9 months ago.

Topic Author Topic
Posted: Thursday Apr 5th, 2012 at 2:11 pm #10181
Hazbro
Username: hazbro

Hello:

I’m trying to get some of the data collected in my S2member registration form to show up on users’ profiles in the plug in Simple:Press 5.0. How would I do that?

I was told in the Simple:Press forums “that plugin (S2member) would have to provide a method for accessing its data…”

Does S2member have a method for accessing data? Is what I’m trying to do even possible?

Also, do you know if the Mingle plugin would be a better forum solution to use with S2member?

Thanks for your help.

List Of Topic Replies

Viewing 9 replies - 1 through 9 (of 9 total)
Author Replies
Author Replies
Posted: Thursday Apr 5th, 2012 at 6:16 pm #10202
David Welch
Username: dwbiz05

check out the s2member -> api/scripting -> php/api constants.

You can get most if not all of your user details through pre-defined tags like:

[s2Get constant="S2MEMBER_CURRENT_USER_DISPLAY_NAME" /]
S2MEMBER_CURRENT_USER_FIRST_NAME
S2MEMBER_CURRENT_USER_LAST_NAME
S2MEMBER_CURRENT_USER_ID
S2MEMBER_CURRENT_USER_LOGIN
S2MEMBER_CURRENT_USER_EMAIL

etc.

Not sure how you need to use it but there you go. You can also access the constants via php like so:

<?php
echo S2MEMBER_CURRENT_USER_EMAIL; 
?>

Hope that helps,
Dave

EDIT: This also works with custom registration fields I believe.

  • This reply was modified 4 years, 9 months ago by  David Welch.
Posted: Friday Apr 6th, 2012 at 1:51 pm #10247
Hazbro
Username: hazbro

Thank you so much! I’ll see if this solves my problem.

Posted: Tuesday Apr 10th, 2012 at 10:26 am #10466
Hazbro
Username: hazbro

Hello:

I added echo do_shortcode(‘[s2Get constant="S2MEMBER_CURRENT_USER_EMAIL" /]‘) to the forum template.

That pulled the current user’s email from S2member into Simple:Press.

The problem now is the shortcode is showing the “current user’s” data for ALL of the users in the Simple:press forum. I want to have each user’s data from S2member show up in their individual Simple:Press profiles.

Is there a way to do this?

Thanks.

Posted: Tuesday Apr 10th, 2012 at 1:11 pm #10477
Hazbro
Username: hazbro

Does S2member have a shortcode or tag that can have a user id passed so that it returns that user’s data?

Posted: Wednesday Apr 11th, 2012 at 1:12 pm #10569
Hazbro
Username: hazbro

Anyone? Anyone?

Posted: Wednesday Apr 11th, 2012 at 1:15 pm #10570
David Welch
Username: dwbiz05

I don’t think s2member has this as a native function. You will probably have to create your own shortcode for this one.

Dave

Posted: Wednesday Apr 11th, 2012 at 1:28 pm #10579
Hazbro
Username: hazbro

Thanks for the response. How would I create a shortcode?

Posted: Wednesday Apr 11th, 2012 at 5:54 pm #10614
Hazbro
Username: hazbro

Could you guys point me in the right direction to create a shortcode to pull registration data (specifically, custom fields) from S2member that would populate in corresponding individual profiles in Simple:Press?

I’ve been trying to get this problem resolved for the past two weeks. I really appreciate all/any help I could get to figure this out.

Thank you!

Posted: Wednesday Apr 11th, 2012 at 10:34 pm #10624
David Welch
Username: dwbiz05

This page tells you how to create shortcodes. You will need to create a function that pulls the user’s data and then does what you want the shortcode to do. (like print information, etc.)

http://codex.wordpress.org/Function_Reference/add_shortcode

NOTE: s2member custom user fields are stored in a serialized array in the database.

Hope that helps!

Dave

PS. If you are not a programmer, you may want to find one to do this for you as there is more involved than just using s2member API variables.

Viewing 9 replies - 1 through 9 (of 9 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.