You are here

function user_badges_delete_form_submit in User Badges 5

Same name and namespace in other branches
  1. 6.2 user_badges.module \user_badges_delete_form_submit()
  2. 6 user_badges.module \user_badges_delete_form_submit()
  3. 7 user_badges.admin.inc \user_badges_delete_form_submit()
  4. 7.2 user_badges.admin.inc \user_badges_delete_form_submit()
  5. 7.3 user_badges.admin.inc \user_badges_delete_form_submit()

File

./user_badges.module, line 703
@brief User Badges module file

Code

function user_badges_delete_form_submit($form_id, $form_values) {
  db_query("DELETE FROM {user_badges_badges} WHERE bid = %d", $form_values['bid']);
  db_query("DELETE FROM {user_badges_user} WHERE bid = %d", $form_values['bid']);
  db_query("DELETE FROM {user_badges_roles} WHERE bid = %d", $form_values['bid']);
  drupal_set_message(t('Badge deleted.'));
  return 'admin/user/user_badges';
}