You are here

function vppr_taxonomy_vocabulary_delete in Vocabulary Permissions Per Role 7

Implements hook_taxonomy_vocabulary_delete().

File

./vppr.module, line 125
Vocabulary Permissions Per Role

Code

function vppr_taxonomy_vocabulary_delete($vocabulary) {
  db_delete('role_permission')
    ->condition('permission', 'administer ' . $vocabulary->machine_name . ' vocabulary terms')
    ->execute();

  // Clear the user access cache.
  drupal_static_reset('user_access');
  drupal_static_reset('user_role_permissions');
}