domain_content_check($domain, $all)
domain_content/domain_content.module, line 80
Access checking routine for the menu and node access checks.
$domain An array representing the currently active domain record.
$all A boolean flag indicating whether this user can access all domains.
function domain_content_check($domain, $all) {
global $user;
// If the user can administer nodes, just return TRUE.
if ($all) {
return TRUE;
}
$rule = variable_get('domain_editors', DOMAIN_EDITOR_RULE);
$check = FALSE;
$editor = FALSE;
// Can this user see the default site?
if ($rule && $domain['domain_id'] == 0 && $user->domain_user['-1'] == -1) {
$editor = TRUE;
}
// Can this user see the active site?
else if ($rule && $domain['domain_id'] > 0 && $domain['domain_id'] == $user->domain_user[$domain['domain_id']]) {
$editor = TRUE;
}
if ($editor) {
$check = TRUE;
}
return $check;
}