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.

Remote user status with CF instead Username?

Home Forums Community Forum Remote user status with CF instead Username?

This topic contains 5 replies, has 2 voices. Last updated by  Cristián Lávaque 3 years, 5 months ago.

Topic Author Topic
Posted: Monday Jul 15th, 2013 at 6:07 pm #53476
Al L
Username: bizzert

I have tested this api and it works fine…

https://www.s2member.com/kb/remote-user-status-custom-api/

BUT, what I want to do is pass a custom field for a user… the custom field is an ID number…

So instead of the api pulling member status off a username, I need to do that by just passing an id number which is saved as a custom field for the users…

List Of Topic Replies

Viewing 5 replies - 1 through 5 (of 5 total)
Author Replies
Author Replies
Posted: Monday Jul 15th, 2013 at 6:08 pm #53477
Al L
Username: bizzert

If theres no way to do the remote user status custom api off a custom field id…. how about by email address instead of the username???

Posted: Monday Jul 15th, 2013 at 6:20 pm #53478
Al L
Username: bizzert

The reason why wanted to go off a unique id in a user’s custom fields.. is because the username and or email address may change at sometime, though the unique id never will…

Hopefully someone can help with this api.. Here’s the link to the api I’d like to modify and go off custom field..

https://www.s2member.com/kb/remote-user-status-custom-api/

Posted: Tuesday Jul 16th, 2013 at 7:28 am #53507

The reason why wanted to go off a unique id in a user’s custom fields.. is because the username and or email address may change at sometime, though the unique id never will…

The username can’t be changed in WP, so you don’t need to worry about that.

If you want to modify the code sample Jason posted in that article, that’s fine. You can use other ways to identify the user, the WP functions reference will be useful: http://codex.wordpress.org/Function_Reference

To get the user’s s2Member custom fields, you can use get_user_field, but if he’s not the one loading the page, you’ll need to know his WP user ID: http://www.s2member.com/r/codex_get_user_field/

Posted: Tuesday Jul 16th, 2013 at 10:14 pm #53546
Al L
Username: bizzert

Well this is the thing…

http://www.example.com/?s2_user_status_api_key=my-secret-api-key&s2_users_custom_field_called_specialid=1234567890

and I want to pull up details and the member status of the user who has that unique identifier in a custom field “specialid”…

Hopefully you or someone can understand and help with an example how to go about this?

Posted: Tuesday Jul 16th, 2013 at 10:29 pm #53548

You’ll need to query the database. This may help: http://www.primothemes.com/forums/viewtopic.php?f=4&t=15658&p=48878#p48878

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