How to save a field value according to another field value and with a user presave hook
To change a field according to another field:
function mymodule_user_presave($account) {

 $data = $account-&gt;field_a-&gt;value;
 $account-&gt;field_b-&gt;value = strtoupper($data);

 drupal_set_message($account-&gt;original-&gt;field_a-&gt;value . ' &gt; ' . $account-&gt;field_a-&gt;value);
 drupal_set_message($account-&gt;original-&gt;field_b-&gt;value . ' &gt; ' . $account-&gt;field_b-&gt;value);

}

To get the original values you would have to use $account-&gt;original. Otherwise you get the new values. To prove that it's working this is the output in messages from the code above after I entered abcdef in field_a:

abc &gt; abcdef
ABC &gt; ABCDEF
The changes have been saved.