I am using the following to add a custom field to a user with a custom variable.
global $user; $account = user_load($user->uid); $language = ($user->language) ? $user->language : 'und'; $edit = array( 'field_favourite_football_team' => array( $language => array( 0 => array( 'value' => 'Manchester City', ), ), ), ); user_save($account, $edit);
Problem: I can see the outputted value on module A but on module B, when I dump or print out that global $user, I can't see that field. Is there anyway to save that on a for global use?