You are here

function imagepicker_insert_user_group in Image Picker 5

Same name and namespace in other branches
  1. 5.2 imagepicker.module \imagepicker_insert_user_group()
  2. 6.2 imagepicker.group.inc \imagepicker_insert_user_group()
  3. 7 imagepicker.group.inc \imagepicker_insert_user_group()
1 call to imagepicker_insert_user_group()
imagepicker_groups_form_submit in ./imagepicker.module
Submit form

File

./imagepicker.module, line 1610
Enables permitted roles to upload images for insertion into configured nodes.

Code

function imagepicker_insert_user_group($record) {
  if (db_query("INSERT INTO {imagepicker_user_groups} (uid, group_name, group_description) VALUES (%d, '%s', '%s')", array(
    $record['uid'],
    $record['group_name'],
    $record['group_description'],
  ))) {
    drupal_set_message(t('Group was successfully inserted'));
  }
  else {
    drupal_set_message(t('Error while trying to insert your group.'));
  }
}