You are here

function uif_import_user in User Import Framework 6

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

Import one user.

1 call to uif_import_user()
uif_batch_import_users_process in ./uif.admin.inc
User import batch processing.

File

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

Code

function uif_import_user($user_data, $notify, &$results, $form_state) {
  if ($uid = db_result(db_query("SELECT uid FROM {users} WHERE mail LIKE '%s'", $user_data['email']))) {
    $account = uif_update_user($user_data, $uid, $form_state);
    $results['updated']++;
  }
  else {
    $account = uif_create_user($user_data, $notify, $form_state);
    $results['created']++;
  }
}