function gauth_account_token_revoke_form_submit in Google Auth 7
Same name and namespace in other branches
- 7.2 gauth.admin.inc \gauth_account_token_revoke_form_submit()
Submit handler to revoke access of an google auth account.
File
- ./
gauth.admin.inc, line 256 - Administration pages for Google OAuth settings.
Code
function gauth_account_token_revoke_form_submit($form, &$form_state) {
if ($form_state['values']['id'] != NULL) {
$rows = gauth_account_revoke_token($form_state['values']['id'], FALSE);
if ($rows == TRUE) {
drupal_set_message(t("Acess token revoked successfully"));
}
else {
drupal_set_message(t("Error occured while revoking token of this account"), "error");
}
}
else {
drupal_set_message(t("Error occured: Can't find account to be revoked"), "error");
}
$form_state['redirect'] = 'admin/config/services/gauth_account';
}