I need to send the member email to a custom field in a channel entry after member creation. We use Profile:Edit to create a channel entry for a member immediately after creating them in the EE admin. Currently it sets the title to the username. I would also like to pass the email address to the channel entry.
First things first... I would recommend that you don't do this at all and instead find a way of using the real email field for whatever purposes you need it. Mainly because the pain of having to keep dual fields in sync will become very tedious, especially if members can update their own email address.
However, if you insist on doing this there are two ways - you could use either or both:
- Build an extension:
Using the member_member_register_start hook you can take the real submitted email field and copy it to a new variable in the $_POST array named to match your custom field. The Channel Form (Safecracker) module should then take care of the rest for you.
Profile:Edit is based on the Channel Form (Safecracker) module, so all it needs is a field with a
EDIT: Sorry I've just realised you're talking about registrations via the control panel, not via the front end, so option 2 above wouldn't apply. You should be able to do it with option 1, but you'll need to use the member_create_start hook or the profile_register_start hook instead.