By sunfish on
What is the data structure for the global variable $user?
I searched and google to no avail. The only things I found are $user->name and $user->uid.
Specifically, I'm looking for the user full name.
If you have the answer, would you mind telling me where I can find the info.
Comments
$user object
The global $user object does not contain the user full name by default. You'll need to enable the profile module included with core and create the fields to collect this information at registration.
-------------------------------------------------------
"The sting in any rebuke is the truth." - Benjamin Franklin
print_r()
The PHP function print_r() can always show you the current structure of an object.
The base user object does not include profile fields. The profile_load_profile($user) function will add whatever extensions you have defined using the profile module.