You are here

public function FeedsUserProcessor::configForm in Feeds 7.2

Same name and namespace in other branches
  1. 6 plugins/FeedsUserProcessor.inc \FeedsUserProcessor::configForm()
  2. 7 plugins/FeedsUserProcessor.inc \FeedsUserProcessor::configForm()

Override parent::configForm().

Overrides FeedsProcessor::configForm

File

plugins/FeedsUserProcessor.inc, line 237
Contains FeedsUserProcessor.

Class

FeedsUserProcessor
Feeds processor plugin. Create users from feed items.

Code

public function configForm(&$form_state) {
  $form = parent::configForm($form_state);
  $form['status'] = array(
    '#type' => 'radios',
    '#title' => t('Status'),
    '#description' => t('Select whether users should be imported active or blocked.'),
    '#options' => array(
      0 => t('Blocked'),
      1 => t('Active'),
    ),
    '#default_value' => $this->config['status'],
  );
  $roles = user_roles(TRUE);
  unset($roles[2]);
  if (count($roles)) {
    $form['roles'] = array(
      '#type' => 'checkboxes',
      '#title' => t('Additional roles'),
      '#description' => t('Every user is assigned the "authenticated user" role. Select additional roles here.'),
      '#default_value' => $this->config['roles'],
      '#options' => $roles,
    );
  }
  $form['defuse_mail'] = array(
    '#type' => 'checkbox',
    '#title' => t('Defuse e-mail addresses'),
    '#description' => t('This appends _test to all imported e-mail addresses to ensure they cannot be used as recipients.'),
    '#default_value' => $this->config['defuse_mail'],
  );
  $form['update_non_existent']['#options'][FEEDS_BLOCK_NON_EXISTENT] = t('Block non-existent users');
  return $form;
}