You are here

function uif_update_user in User Import Framework 6

Same name and namespace in other branches
  1. 7 uif.admin.inc \uif_update_user()

Update an existing user.

1 call to uif_update_user()
uif_import_user in ./uif.admin.inc
Import one user.

File

./uif.admin.inc, line 468
Simple, extensible user import from a CSV file.

Code

function uif_update_user($user_data, $uid, $form_state) {
  $account = user_load($uid);

  // todo: Support update of user mail, name, and password
  // Supporting user mail change requires optional inclusion of uid column, which
  // would override use of email column as uid lookup method.
  $additions = module_invoke_all('uif_pre_update', $account, $user_data, $form_state);
  $account = user_save($account, $additions);
  module_invoke_all('uif_post_update', $account, $user_data, $form_state);
  return $account;
}