I am trying to programmatically change a custom field in a user object and I'm having very little success. I want to just use a function to set the field for the object, like
field_get_items, except a setter version.
It seems like I could do:
$account = user_load($GLOABALS['user']->uid); $edit = array( 'field_custom' => array( 'und' => array( 0 => array( 'value' => $lead_id ) ) ) ); user_save($account, $edit)
But there must be a better way to do this.
Any help would be appreciated. Thanks!