You are here

function forum_access_update_1 in Forum Access 5

Same name and namespace in other branches
  1. 6 forum_access.install \forum_access_update_1()

Purge orphaned grants that were left behind when deleting roles.

File

./forum_access.install, line 45

Code

function forum_access_update_1() {
  $ret = array();
  db_query("DELETE FROM {forum_access} WHERE rid NOT IN (SELECT rid from {role})");
  db_query("DELETE FROM {node_access} WHERE realm = 'forum_access' AND gid NOT IN (SELECT rid from {role})");
  return $ret;
}