You are here

function domain_set_default_grant in Domain Access 5

Same name and namespace in other branches
  1. 6.2 domain.module \domain_set_default_grant()
  2. 7.3 domain.module \domain_set_default_grant()
  3. 7.2 domain.module \domain_set_default_grant()

Ensure that the 'domain_all' grant is present.

2 calls to domain_set_default_grant()
domain_enable in ./domain.module
Upon enabling this module, store the default view grant in the {node_access} table.
domain_menu in ./domain.module
Implement hook_menu()

File

./domain.module, line 989
Core module functions for the Domain Access suite.

Code

function domain_set_default_grant() {
  $check = db_result(db_query("SELECT COUNT(nid) FROM {node_access} WHERE realm = 'domain_all' AND gid = 0"));
  if (!$check) {
    db_query("INSERT INTO {node_access} VALUES (0, 0, 'domain_all', 1, 0, 0)");
  }
}