[support] How to access a user id & nickname from PHP ?
Xavier Bestel
xavier.bestel at free.fr
Fri May 7 14:24:51 UTC 2010
Hi again,
So I've build this CCK node with various fields, some of them are
userreferences. I want to access some values from PHP (in a custom CCK
computedfield), but it doesn't seem to work:
- I can access e.g. the date from my field_date using
$node->field_date[0]['value'];
- If I try to access a user from field_proprio, I get nothing. I tried
$node->field_proprio[0]['value'] and
$node->field_proprio_uid[0]['value'] but none of them work.
Could anyone tell me how I can access a user, or which bit of the
copious Drupal doc I should look at ?
Thanks,
Xav
More information about the support
mailing list