You are here

function gauth_user_services_delete_form_submit in Google Auth 7

Same name and namespace in other branches
  1. 7.2 gauth_user/gauth_user.admin.inc \gauth_user_services_delete_form_submit()

Submit handler to delete an google auth services account.

File

gauth_user/gauth_user.admin.inc, line 213
Administration pages for Google Auth User Services.

Code

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