What is the "Category" argument in user_save for? I'm working on a custom module that edits the user's details. I'm using 

user_save($user_entity,$new_field_values);


But I see there is a third argument in user_save called "category". What exactly is it for?
As you see in user_save function it tells that


  category: (optional) The category for storing profile information in.


It basically used in below lines of code inside user_save function

user_module_invoke('presave', $edit, $account, $category);
user_module_invoke('update', $edit, $account, $category);
user_module_invoke('insert', $edit, $account, $category);


So, the information is just passed to all presave, update, insert hooks so that they can take contextual actions.

In user_module_invoke function $category is defined as


  $category: The category of user information being acted upon.


So, from above it clarifies that is used as a value to tell all hooks that we are saving user details and on which part of user information we are acting upon. Something like if we change the user organic groups that he belongs to then we can specify that $category as "organic_group" .

For Example if you see hook_user_presave in user module

/**
 * Implements hook_user_presave().
 */
function user_user_presave(&amp;$edit, $account, $category) {
  if ($category == 'account' || $category == 'register') {
    if (!empty($edit['picture_upload'])) {
      $edit['picture'] = $edit['picture_upload'];
    }
    // Delete picture if requested, and if no replacement picture was given.
    elseif (!empty($edit['picture_delete'])) {
      $edit['picture'] = NULL;
    }
    // Prepare user roles.
    if (isset($edit['roles'])) {
      $edit['roles'] = array_filter($edit['roles']);
    }
  }

  // Move account cancellation information into $user-&gt;data.
  foreach (array('user_cancel_method', 'user_cancel_notify') as $key) {
    if (isset($edit[$key])) {
      $edit['data'][$key] = $edit[$key];
    }
  }
}


You can see the use case of $category above where they check for account or register !

In your case just make it as an optional and don't assign any value :-)