You are here

function rb_user_condition_username_is_valid_form in Rules Bonus Pack 6

Configuration form for 'rb_user_condition_username_is_valid'.

File

./rb_user.module, line 112
Functions for extending user management with Rules.

Code

function rb_user_condition_username_is_valid_form($settings, &$form) {
  $form['settings']['username'] = array(
    '#type' => 'textfield',
    '#title' => 'Potential user name',
    '#description' => t('The string will be tested against Drupal\'s rules for
      user names.'),
    '#default_value' => $form['settings']['username'],
  );
  $form['settings']['is_available'] = array(
    '#type' => 'checkbox',
    '#title' => 'Check availability',
    '#description' => t('Also check that the user name is not already taken'),
    '#default_value' => $settings['is_available'],
  );
}