Get the email field from user in content profile

borniol - October 28, 2009 - 18:29
Project:Content Profile
Version:6.x-1.0-beta4
Component:Base module
Category:support request
Priority:normal
Assigned:Unassigned
Status:active
Description

I m using a content profile node type with CCK and email Field, and would like to make available in the content profile the email of the drupal user related to this content profile type. Each drupal users have a content profile , but they do not edit their content profile. An administrator user does the job, and complete content profile for each users.
The problem is that is i would like to autofill the email cck field with the drupal user's email.
When i use the php code in the default value :
global $user;
return array(
0 => array('your_field_name' => $user->mail),
);

it works but it autofills the email with the admin user email who is logged but not with the user profile i m editing. How can i code this in php, to retrieve the uid of the user i m editing his content profile and get his email field ? I have some useful information in the url http://mysite.com/user/30/profile/profile?uid=30&destination=user%2F30

Thanks in advance for your support

 
 

Drupal is a registered trademark of Dries Buytaert.