Update user fields programatically resets password When trying to update user (custom) fields programatically in drupal 7, I get the weird problem that whenever I do, my password is reset, my user is logged out, and I have to reset password to be able to log-in again. 

I have tried a few different things, none seem to work, here's my code.

global $user;
global $language;
$fullUser = user_load($user-&gt;uid);

$updateUserParams = array();

$updateUserParams['language'] = $language-&gt;language;
$updateUserParams['field_first_name'][LANGUAGE_NONE][0]['value'] = $form_state['values']['firstName'];
$updateUserParams['field_surname'][LANGUAGE_NONE][0]['value'] = $form_state['values']['lastName'];

$year = $form_state['values']['birthdate']['year'];
$month = $form_state['values']['birthdate']['month'];
$day = $form_state['values']['birthdate']['day'];

$birthdate = date( "Y-m-d", strtotime($year.'-'.$month.'-'.$day));

$updateUserParams['field_birthdate'][LANGUAGE_NONE][0]['value'] = $birthdate;
$updateUserParams['gender'][LANGUAGE_NONE][0]['value'] = $form_state['values']['gender'];
$updateUserParams['field_address']['en'][0]['thoroughfare'] = $form_state['values']['street'];
$updateUserParams['field_address']['en'][0]['postal_code'] = $form_state['values']['postalCode'];
$updateUserParams['field_address']['en'][0]['locality'] = $form_state['values']['city'];
$updateUserParams['field_phone'][LANGUAGE_NONE][0]['value'] = $form_state['values']['phone'];

user_save($user, $updateUserParams);


What am I doing wrong?
If you look user_save there special code at the top, that prevent updating password if pass not provided on $updateUserParams. So please check your other modules or Rules, that possibly resetting password each time, then user_save called.