You are here

function user_import_preferences in User Import 7.2

Same name and namespace in other branches
  1. 8 user_import.admin.inc \user_import_preferences()
  2. 5.2 user_import.module \user_import_preferences()
  3. 5 user_import.module \user_import_preferences()
  4. 6.4 user_import.admin.inc \user_import_preferences()
  5. 6.2 user_import.admin.inc \user_import_preferences()
  6. 7.3 user_import.admin.inc \user_import_preferences()
  7. 7 user_import.admin.inc \user_import_preferences()
1 string reference to 'user_import_preferences'
user_import_menu in ./user_import.module
Implementation of hook_menu().

File

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

Code

function user_import_preferences($import_id = NULL, $template_id = NULL) {
  if (empty($import_id)) {
    $private_path = variable_get('file_private_path', FALSE);

    // Private path hasn't been set, show a message instead of the form.
    if (!$private_path) {
      drupal_set_message(t('!path needs to be set before users can be imported.', array(
        '!path' => l('Private file system path', 'admin/config/media/file-system', array(
          'query' => array(
            'destination' => 'admin/people/user_import/add',
          ),
        )),
      )), 'warning');
      return ' ';
    }
    $output = drupal_get_form('user_import_add_form');
  }
  else {
    $output = drupal_get_form('user_import_edit', $import_id, $template_id);
  }
  return $output;
}