You are here

function user_import_edit_submit in User Import 8

Same name and namespace in other branches
  1. 6.4 user_import.admin.inc \user_import_edit_submit()
  2. 6.2 user_import.admin.inc \user_import_edit_submit()
  3. 7.3 user_import.admin.inc \user_import_edit_submit()
  4. 7 user_import.admin.inc \user_import_edit_submit()
  5. 7.2 user_import.admin.inc \user_import_edit_submit()
1 string reference to 'user_import_edit_submit'
user_import_edit in ./user_import.admin.inc

File

./user_import.admin.inc, line 666
Provide administration configuration pages to import users.

Code

function user_import_edit_submit($form, &$form_state) {

  // Deal with import being canceled.
  if ($form_state['clicked_button']['#value'] == t('Cancel')) {
    $form_state['redirect'] = 'admin/people/user_import';
    return;
  }

  // Load import functions.
  module_load_include('inc', 'user_import', 'user_import.import');
  if ($form_state['values']['setting'] == 'file set') {

    //    $file           = new stdClass();
    //    $file->uri      = $form_state['values']['filepath'];
    //    $file->filename = $form_state['values']['filename'];

    //$filepath       = file_move($file, file_directory_path() . '/' . $form_state['values']['filename']);
    $filepath = user_import_move_file_for_processing($form_state['values']['filepath']);
  }
  if (!empty($form_state['values']['og_id'])) {
    $form_state['values']['groups'][$form_state['values']['og_id']] = $form_state['values']['og_id'];
  }
  $form_state['values']['ftp'] = $form_state['values']['ftp'];
  $form_state['values'] = _user_import_settings_save($form_state['values']);
  $form_state['values']['save']['update'] = NULL;
  $form_state['values']['import_template_id'] = NULL;
  $form_state['values']['save']['name'] = NULL;
  $form_state['redirect'] = $form_state['values']['return_path'];
  _user_import_process($form_state['values']);
}