Tips and Tricks HQ Support Portal › Forums › WP eMember › Best method to get and set eMember member custom fields?
Tagged: get member data, set member data, user integration
- This topic has 4 replies, 2 voices, and was last updated 10 years, 10 months ago by mskalla.
-
AuthorPosts
-
January 8, 2014 at 7:09 pm #10377mskallaMember
I am working on a project in which uses of one role ‘manage’ users of another role, and as such need to be able to view and edit other users’ data. This project is also using the eMember plugin with WP integration enabled (creating a member creates a WP user account, etc). Some user data fields are part of the WP user account, some are supplied by WP user metadata, some are part of the emember account, and some are from the emember plugin’s ability to create custom fields in the emember signup form. I can get WP user data and metadata, but how do I retrieve emember member data and metadata using a WP user ID? I need to be able to set the data as well as retrieve it. Are there any helper methods to handle any of the following tasks?
- get an emember member ID from a WP user ID (not just the current logged in user, but any user by ID)
- get emember data (stored in the wp_eMember_members_tbl database table)
- set emember data (stored in the wp_eMember_members_tbl database table)
- get emember metadata (stored in the wp_members_meta_tbl database table)
- set emember metadata (stored in the wp_members_meta_tbl database table)
Thanks for any help.
January 9, 2014 at 10:49 pm #60201adminKeymasterYeah, some of those should be doable via some helper functions and shortcodes. Check this post:
How to Retrieve and Show Specific Details of the Logged-in Member
We also have an API for creating member accounts from your own script:
January 10, 2014 at 11:53 am #60202mskallaMemberI had looked through that page prior to posting (as well as here:
and here:
and here:
How to Retrieve and Show Specific Details of the Logged-in Member
None of these answer my questions.
Again, I need to get and set member details, such as the address, city, state, zip, and phone number, (all of which are in the eMember signup form and do not seem to be changeable in any way after the user has submitted that form) using the member’s WP user ID, not their member ID. I do not only need to do this for the currently logged in user (allow the current user to view and edit their own membership data), but I need to allow users to be able to do this for other users as well, so being able to perform these operations on just the currently logged in user is not what I need. Finally, none of these above pages have anything at all about setting any of these values, even for the current user.
Thanks again for any further assistance.
January 11, 2014 at 2:08 am #60203adminKeymasterI see what you mean. We don’t have any option for what you asked.
January 14, 2014 at 6:33 pm #60204mskallaMemberOk, thanks, that is what I needed to know!
-
AuthorPosts
- You must be logged in to reply to this topic.