function profile_field_delete_submit
7.x profile.admin.inc | profile_field_delete_submit($form, &$form_state) |
6.x profile.admin.inc | profile_field_delete_submit($form, &$form_state) |
Process a field delete form submission.
File
- drupal-6.x/
modules/ profile/ profile.admin.inc, line 380 - Administrative page callbacks for the profile module.
Code
function profile_field_delete_submit($form, &$form_state) {
db_query('DELETE FROM {profile_fields} WHERE fid = %d', $form_state['values']['fid']);
db_query('DELETE FROM {profile_values} WHERE fid = %d', $form_state['values']['fid']);
cache_clear_all();
drupal_set_message(t('The field %field has been deleted.', array('%field' => $form_state['values']['title'])));
watchdog('profile', 'Profile field %field deleted.', array('%field' => $form_state['values']['title']), WATCHDOG_NOTICE, l(t('view'), 'admin/user/profile'));
$form_state['redirect'] = 'admin/user/profile';
return;
}