You are here

function securesite_uninstall in Secure Site 8

Same name and namespace in other branches
  1. 5 securesite.install \securesite_uninstall()
  2. 6.2 securesite.install \securesite_uninstall()
  3. 6 securesite.install \securesite_uninstall()
  4. 7.2 securesite.install \securesite_uninstall()

Implements hook_uninstall().

File

./securesite.install, line 24
Secure Site installation functions.

Code

function securesite_uninstall() {
  $config_securesite = \Drupal::config('securesite.settings');
  \Drupal::config('system.site')
    ->set('page.403', $config_securesite
    ->get('securesite_403'))
    ->save();
  if (in_array(SECURESITE_DIGEST, $config_securesite
    ->get('securesite_type'))) {
    $script = $config_securesite
      ->get('securesite_password_script');
    $realm = $config_securesite
      ->get('securesite_realm');
    exec("{$script} realm=" . escapeshellarg($realm) . ' op=delete');
  }
}