You are here

function profile_field_delete_submit in Drupal 5

Same name and namespace in other branches
  1. 4 modules/profile.module \profile_field_delete_submit()
  2. 6 modules/profile/profile.admin.inc \profile_field_delete_submit()
  3. 7 modules/profile/profile.admin.inc \profile_field_delete_submit()

Process a field delete form submission.

File

modules/profile/profile.module, line 389
Support for configurable user profiles.

Code

function profile_field_delete_submit($form_id, $form_values) {
  db_query('DELETE FROM {profile_fields} WHERE fid = %d', $form_values['fid']);
  db_query('DELETE FROM {profile_values} WHERE fid = %d', $form_values['fid']);
  cache_clear_all();
  drupal_set_message(t('The field %field has been deleted.', array(
    '%field' => $form_values['title'],
  )));
  watchdog('profile', t('Profile field %field deleted.', array(
    '%field' => $form_values['title'],
  )), WATCHDOG_NOTICE, l(t('view'), 'admin/user/profile'));
  return 'admin/user/profile';
}