I have added two fields one First Name and Last Name each profile_fname and profile_lname. I would like to access these for the current user in a content page with a format of PHP.

I have tried $user->profile_fname and $user->profile_lastname but the come up blank. I must be missing something.

Thanks,
Glen Barnhardt

Comments

barnent1’s picture

sorry I have meant $user->profile_lname for the second one I mistyped.

barnent1’s picture

Priority: Normal » Critical

Will somebody please answer my questions?

mshaver’s picture

Where are you using $user->profile_lname? If it's in a template file, you may need to use "account" vs "user", I also think it's better practice.

pancho’s picture

Status: Active » Closed (duplicate)

marked this as duplicate of http://drupal.org/node/119114 - the issue is being fixed there.