I added a new field(First name) in Account settings under Configuration & its machine name is 'field_first_name'
I am trying to load this value in home page like this
<?php print $user->field_first_name ?>
But the above code is not working. Please help. I debug $user and found that this value isn't there. What should I do to show the value of the newly added field in home page.
I've added screenshot.
$user
, to do that:dpm($user);
(if you have devel module installed), otherwiseecho '<PRE>'; print_r($user);
, than you can check what is the exact name of field first name in the user object.