You are here

function cas_user_delete_form_submit in CAS 7

Same name and namespace in other branches
  1. 6.3 cas.pages.inc \cas_user_delete_form_submit()

File

./cas.pages.inc, line 64
User page callbacks for the cas module.

Code

function cas_user_delete_form_submit($form, &$form_state) {
  $query = db_delete('cas_user')
    ->condition('uid', $form_state['build_info']['args'][0]->uid)
    ->condition('aid', $form_state['build_info']['args'][1])
    ->execute();
  if ($query) {
    drupal_set_message(t('CAS username deleted.'));
  }
  $form_state['redirect'] = 'user/' . $form_state['build_info']['args'][0]->uid . '/cas';
}