You are here

function userpoints_uninstall in User Points 7

Same name and namespace in other branches
  1. 5.3 userpoints.install \userpoints_uninstall()
  2. 5 userpoints.install \userpoints_uninstall()
  3. 5.2 userpoints.install \userpoints_uninstall()
  4. 6 userpoints.install \userpoints_uninstall()
  5. 7.2 userpoints.install \userpoints_uninstall()

Implements hook_uninstall().

File

./userpoints.install, line 211
Install time hook userpoints module.

Code

function userpoints_uninstall() {
  db_delete('variable')
    ->condition('name', 'userpoints_%', 'LIKE')
    ->execute();
  $vid = db_query("SELECT vid FROM {taxonomy_vocabulary} WHERE module='userpoints'")
    ->fetchField();
  if ($vid && function_exists('taxonomy_vocabulary_delete')) {
    taxonomy_vocabulary_delete($vid);
  }
}