You are here

function og_add_users in Organic groups 6.2

Same name and namespace in other branches
  1. 5.8 og.module \og_add_users()
  2. 5 og.module \og_add_users()
  3. 5.2 og.module \og_add_users()
  4. 5.3 og.module \og_add_users()
  5. 5.7 og.module \og_add_users()
  6. 6 og.module \og_add_users()
1 string reference to 'og_add_users'
og_menu in ./og.module
Implementation of hook_menu().

File

./og.pages.inc, line 403
Page callbacks for Organic groups.

Code

function og_add_users($form_state, $group_node) {
  $form['og_names'] = array(
    '#type' => 'textarea',
    '#title' => t('List of users'),
    '#rows' => 5,
    '#cols' => 70,
    // No autocomplete b/c user_autocomplete can't handle commas like taxonomy. pls improve core.
    // '#autocomplete_path' => 'user/autocomplete',
    '#description' => t('Add one or more usernames in order to associate users with this group. Separate multiple usernames by commas or new lines.'),
    '#required' => TRUE,
  );
  $form['op'] = array(
    '#type' => 'submit',
    '#value' => t('Add users'),
  );
  $form['gid'] = array(
    '#type' => 'value',
    '#value' => $group_node->nid,
  );
  return $form;
}