You are here

function oauth_common_form_authorization_delete_submit in OAuth 1.0 6.3

Same name and namespace in other branches
  1. 7.4 oauth_common.authorizations.inc \oauth_common_form_authorization_delete_submit()
  2. 7.3 oauth_common.authorizations.inc \oauth_common_form_authorization_delete_submit()

File

./oauth_common.authorizations.inc, line 247
Functions related to a user's authorization section

Code

function oauth_common_form_authorization_delete_submit($form, $form_state) {
  $values = $form_state['values'];
  $token = $values['token_object'];
  $consumer = $token->consumer;
  $token
    ->delete();
  drupal_set_message(t('The @consumer token @token was deleted.', array(
    '@consumer' => $consumer->name,
    '@token' => $token->key,
  )));
}