Update role with hook user update i'm updating role using hook user update like this : 

function my_module_user_update(&amp;$edit, $account, $category) {  
  //print_r($account-&gt;field_my_field['und'][0]['value']);exit;
  if($account-&gt;field_my_field['und'][0]['value'] == 1 ) { 
    $uid = $account-&gt;uid;
    $role_name = 'Spanish';
    if ($role = user_role_load_by_name($role_name)) {
      user_multiple_role_edit(array($uid), 'add_role', $role-&gt;rid);
      //print "1";print_r($role);exit;
    }
  }
  elseif($account-&gt;field_my_field['und'][0]['value'] == 0 ) {
    $uid = $account-&gt;uid;
    $role_name = 'Spanish';
    if ($role = user_role_load_by_name($role_name)) {
      user_multiple_role_edit(array($uid), 'remove_role', $role-&gt;rid);
     //print "2";print_r($role);exit;
    }
  }
}


but it is not working : user's role is not updating 
my hook_update_user is correctly called, 
i clear cache after all change in script ,
i have syslog and database logging enabled to see the error log, but there is no error 

When i doing like this (with just one condition), it's working , i have no problem : user's role is correctly updated accoding the condition 

function my_module_user_update(&amp;$edit, $account, $category) {  

     if($account-&gt;field_my_field['und'][0]['value'] == 1 ) { 
       $uid = $account-&gt;uid;
       $role_name = 'Spanish';
       if ($role = user_role_load_by_name($role_name)) {
            user_multiple_role_edit(array($uid), 'add_role', $role-&gt;rid);
          //print "1";print_r($role);exit;
       }
    }

}


any ideas ?
hook_user_update : Modules may use this hook to update their user data in a custom storage after a user account has been updated. 

So that hook is call only when you edit the user account. other things is disable you module which implement this hook.

Morever if you want to edit the role every time when user is created/edited use hook_user_presave.