You are here

function auto_username_uninstall in Automatic User Names 8

Same name and namespace in other branches
  1. 7 auto_username.install \auto_username_uninstall()

Implements hook_uninstall().

File

./auto_username.install, line 11
Install, update and uninstall functions for the auto_username module.

Code

function auto_username_uninstall() {

  // Delete all the aun variables and then clear the variable cache.
  global $conf;
  if (isset($conf)) {
    foreach (array_keys($conf) as $key) {

      // Find variables that have the module prefix.
      if (strpos($key, 'aun_') === 0) {
        Drupal::state()
          ->delete($key);
      }
    }
  }
}