January 8, 2014 at 7:09 pm #10377
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 #60201adminKeymaster
Yeah, some of those should be doable via some helper functions and shortcodes. Check this post:
We also have an API for creating member accounts from your own script:January 10, 2014 at 11:53 am #60202
I had looked through that page prior to posting (as well as here:
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 #60203adminKeymaster
I see what you mean. We don’t have any option for what you asked.January 14, 2014 at 6:33 pm #60204
Ok, thanks, that is what I needed to know!
- You must be logged in to reply to this topic.