user_save adds values to the user, but they aren't "active" I'm taking over a website that had a user import; it has a function that sets the value for some Boolean fields on the user.

$user-&gt;field_perm_connexion['und'][0]['value'] = (int)$permissions['perm_connexion'];
user_save($user);


When I edit the user, the value is correctly checked; when I execute code like the following, the value is wrong.

$user_perm = user_load($uid);
// don't judge the ['und'][0]['value']
if(!empty($user_perm-&gt;field_perm_connexion) &amp;&amp; $user_perm-&gt;field_perm_connexion['und'][0]['value'] == 1){
    $is_allowed = TRUE;
}


I need to go to the user page (in the people menu) and save again, to get the correct values.

What could the problem behind this be?
It may be static cache, try:

$user_perm = user_load($uid, TRUE);