You are here

function roleassign_uninstall in RoleAssign 5

Same name and namespace in other branches
  1. 6 roleassign.install \roleassign_uninstall()
  2. 7.2 roleassign.install \roleassign_uninstall()
  3. 7 roleassign.install \roleassign_uninstall()

Implementation of hook_uninstall().

File

./roleassign.install, line 36

Code

function roleassign_uninstall() {

  // Deleted RoleAssign's variables
  global $conf;
  $result = db_query("SELECT name FROM {variable} WHERE name LIKE 'roleassign_%'");
  while ($row = db_fetch_array($result)) {
    unset($conf[$row['name']]);
  }
  $result = $result && db_query("DELETE FROM {variable} WHERE name LIKE 'roleassign_%'");
  _roleassign_install_message(t('Failed to delete variables for RoleAssign.'), $result);
  cache_clear_all('variables', 'cache');
  _roleassign_install_message();
}