You are here

function gauth_account_delete_form_submit in Google Auth 7

Same name and namespace in other branches
  1. 7.2 gauth.admin.inc \gauth_account_delete_form_submit()

Submit handler to delete an google auth account.

File

./gauth.admin.inc, line 215
Administration pages for Google OAuth settings.

Code

function gauth_account_delete_form_submit($form, &$form_state) {
  if ($form_state['values']['id'] != NULL) {
    $rows = gauth_account_delete($form_state['values']['id'], FALSE);
    if ($rows == 1) {
      drupal_set_message(t("The account is deleted successfully"));
    }
    else {
      drupal_set_message(t("Error occured while deleting the account"), "error");
    }
  }
  else {
    drupal_set_message(t("Error occured: Can't find account to be deleted"), "error");
  }
  $form_state['redirect'] = 'admin/config/services/gauth_account';
}