You are here

function shib_auth_uninstall in Shibboleth Authentication 6.3

Same name and namespace in other branches
  1. 5.3 shib_auth.install \shib_auth_uninstall()
  2. 5.2 shib_auth.install \shib_auth_uninstall()
  3. 6.4 shib_auth.install \shib_auth_uninstall()
  4. 6 shib_auth.install \shib_auth_uninstall()
  5. 6.2 shib_auth.install \shib_auth_uninstall()
  6. 7.4 shib_auth.install \shib_auth_uninstall()

Implementation of hook_uninstall().

Hook to uninstall variables and the block, witch were created and used by the module

File

./shib_auth.install, line 35
This is the install file of the Shibboleth authentication module for Drupal system

Code

function shib_auth_uninstall() {

  // Drop variables.
  $variables = array(
    'auth_link_text',
    'shib_auth_handler_url',
    'shib_auth_handler_protocol',
    'shib_auth_wayf_uri',
    'shib_auth_username_variable',
    'shib_auth_username_email',
    'shib_auth_auto_destroy_session',
    'shib_logout_url',
    'shib_auth_debug_state',
    'shib_auth_debug_url',
    'shib_auth_mail_shib_only',
  );
  foreach ($variables as $variable) {
    variable_del($variable);
  }

  // Remove block from the 'blocks' table manually
  db_query("DELETE FROM {blocks} WHERE module = 'shib_auth'");
  cache_clear_all(NULL, 'cache_block');
  drupal_uninstall_schema('shib_auth');
  drupal_set_message(t('The Shibboleth authentication module was uninstalled successfully.'));
}