Active
Project:
Content Profile
Version:
6.x-1.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
18 May 2010 at 22:41 UTC
Updated:
18 May 2010 at 22:41 UTC
I wanted to add an email field to the profile that links to the associated contact form. I thought the easiest way to do this would be to add an email field. Not a problem, works fine.
When a user registers with the site though they have to enter an email address. I thought it would be possible to get the email in the profile to automatically be populated with the registered email so I entered some default php code into the default value box:
global $user;
return array(
0 => array('email' => $user->mail),
);
This works fine for user 0, but doesn't work for anyone else. Is the code correct? Is there a better way to do this?
Regards,
Nick