hook_domainload

Versions
domain
hook_domainload(&$domain)

Notifies other modules that we are loading a domain record from the database.

Modules may overwrite or add to the $domain array for each domain.

When loading lists of domains or generating domain information, either use the proper functions -- domain_default(), domain_lookup(), and domain_domains() -- or invoke this hook.

Invoked by domain_lookup() and domain_default().

Parameters

&$domain The current $domain array.

Return value

No return value. The $domain array is modified by reference..

Related topics

Code

./API.php, line 98

<?php
function hook_domainload(&$domain) {
  // Add a variable to the $domain array.
  $domain['myvar'] = 'mydomainvar';
  // Remove the site_grant flag, making it so users can't see content for 'all affiliates.'
  $domain['site_grant'] = FALSE;
}
?>

Contact

  • agentrickard [at] gmail [dot] com

Donations

My Amazon.com Wish List