You are here

function gauth_account_edit_form_submit in Google Auth 7

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

Submit handler for adding a new account to google auth accounts.

File

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

Code

function gauth_account_edit_form_submit($form, &$form_state) {
  $id = gauth_account_save($form_state['values']);
  if (!$id['is_authenticated']) {
    gauth_account_authenticate($id['id'], FALSE);
  }
  drupal_set_message(t('Api Account saved'));
  $form_state['redirect'] = 'admin/config/services/gauth_account';
}