You are here

function user_import_edit_submit in User Import 6.2

Same name and namespace in other branches
  1. 8 user_import.admin.inc \user_import_edit_submit()
  2. 6.4 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 521
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/user/user_import';
    return;
  }
  module_load_include('inc', 'user_import', 'user_import.import');
  if ($form_state['values']['setting'] == 'file set') {
    $filepath = file_move($form_state['values']['filepath'], file_directory_path() . '/' . $form_state['values']['filename']);
  }
  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']);
}