function commons_create_first_group_submit in Drupal Commons 7.3
Save the first group form.
See also
File
- ./
commons.install, line 402 - Install, update and uninstall functions for the Commons install profile.
Code
function commons_create_first_group_submit($form_id, &$form_state) {
$values = $form_state['values'];
$first_group = new stdClass();
$first_group->type = 'group';
node_object_prepare($first_group);
$first_group->title = $values['commons_first_group_title'];
$first_group->body[LANGUAGE_NONE][0]['value'] = $values['commons_first_group_body'];
$first_group->uid = 1;
$first_group->language = LANGUAGE_NONE;
$first_group->status = 1;
node_save($first_group);
}