imce_profile_submit

Definition

imce_profile_submit($form, &$form_state)
imce/inc/admin.inc, line 255

Description

Profile form submit.

Code

<?php
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;
}
?>