Is possible to choose the file_default_scheme to save avatars?
file_default_scheme() returns a variable using variable_get(), unfortunately it just returns it straight without hooking out to any other modules.

For modules that call user_save() directly I don't see any way around this without patching the user module, there's just no way to intercept it.

For the user profile and registration forms you might be able to override the submit handlers, and call your own version of user_save() which contains logic to choose the right file scheme. I don't have time to test it but it would probably look something like this:

function MYMODULE_form_alter(&amp;$form, &amp;$form_state, $form_id) {
  if ($form_id == 'user_profile_form') {
    // Remove the standard submit handler
    if(($key = array_search('user_profile_form_submit', $form['#submit'])) !== FALSE) {
      unset($form['#submit'][$key]);
    }
    // And add the custom one
    $form['#submit'][] = 'MYMODULE_user_profile_form_submit';
  }
}

function MYMODULE_user_profile_form_submit($form, &amp;$form_state) {
  // Copy the code from user_profile_submit() and change the user_save()
  // line to MYMODULE_user_save()
}

function MYMODULE_user_save($account, $edit = array(), $category = 'account') {
  // Copy the code from user_save() and change the file scheme as required.
}


There might be some caveats to that I haven't though of but hopefully it'll provide a good place to start.