You are here

function imagepicker_update_user_group in Image Picker 5.2

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

File

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

Code

function imagepicker_update_user_group($record) {
  if (db_query("UPDATE {imagepicker_user_groups} SET group_name='%s', group_description='%s', public=%d, avail_roles='%s' WHERE gid = %d", array(
    $record['group_name'],
    $record['group_description'],
    $record['public'],
    $record['avail_roles'],
    $record['gid'],
  ))) {
    drupal_set_message(t('Group was successfully updated'));
  }
  else {
    drupal_set_message(t('Error while trying to update your group.'));
  }
}