You are here

function oauth2_server_uninstall in OAuth2 Server 7

Implements hook_uninstall().

File

./oauth2_server.install, line 358

Code

function oauth2_server_uninstall() {
  drupal_load('module', 'oauth2_server');

  // Delete attached fields.
  field_attach_delete_bundle('oauth2_server_authorization_code', 'oauth2_server_authorization_code');
  foreach (array_keys(oauth2_server_token_bundles()) as $bundle) {
    field_attach_delete_bundle('oauth2_server_token', $bundle);
  }
  variable_del('oauth2_server_keys');
  variable_del('oauth2_server_keys_last_generated');
  variable_del('oauth2_server_next_certificate_id');
  variable_del('oauth2_server_user_sub_property');
  variable_del('oauth2_server_restful_server');
  variable_del('oauth2_server_restful_scope');
}