You are here

function imce_profile_submit in IMCE 6.2

Same name and namespace in other branches
  1. 6 inc/admin.inc \imce_profile_submit()
  2. 7 inc/imce.admin.inc \imce_profile_submit()

Profile form submit.

1 string reference to 'imce_profile_submit'
imce_profile_form in inc/imce.admin.inc
Profile form.

File

inc/imce.admin.inc, line 324
Serves administration pages of IMCE.

Code

function imce_profile_submit($form, &$form_state) {
  $profile = $form_state['values']['profile'];
  $pid = $form_state['values']['pid'];
  $message = $pid > 0 ? t('The changes have been saved.') : t('Profile has been added.');

  //unset empty fields of directories and thumbnails.
  imce_clean_profile_fields($profile);

  //save profile.
  $pid = imce_update_profiles($pid, $profile);
  drupal_set_message($message);
  $form_state['redirect'] = 'admin/settings/imce/profile/edit/' . $pid;
}