The following works so far:
- I can set a custom user field e.g. 'full_name' in Drupal Account Settings
The logged in user has access to this field using the following code.
global $user; $user = user_load($user->uid); // Fully load the user object $custom_vars['full_name'] = $user->field_full_name[LANGUAGE_NONE]['value']; echo "My full name is : $custom_vars['full_name']";
This is what I want to do:
- I want to log in as an admin account and for a specific group of
users who's unique IDs know I want to display this field.
- So perhaps for userID = (1234, 1175, 14532) I want to see this value
'full_name', how do I do it?
I am hoping for a PHP solution that uses code similar to the above rather than a SQL DB call, but if I need to directly access the DB so be it.