domain_alias_domain_bootstrap_lookup($domain)Implement hook_domain_bootstrap_lookup().
Tries to match the given domain name against patterns in the {domain_alias} table and, if successful, updates information in given parameter $domain.
domain_resolve_name()
$domain An array containing current domain (host) name and the results of lookup against {domain} table.
An array containing at least a valid domain_id. Other values are: -- 'active_alias_id' => the currently active alias. -- 'redirect' => a boolean flag telling the module to redirect to the registered domain name if accessed from an alias.
domain_alias/domain_alias.module, line 39
<?php
function domain_alias_domain_bootstrap_lookup($domain) {
// If we had an exact match, then $domain['sitename'] is populated.
// Otherwise, we must do an advanced check.
if (isset($domain['sitename'])) {
return;
}
$alias = domain_alias_lookup($domain['subdomain']);
if ($alias != -1) {
$domain['domain_id'] = $alias['domain_id'];
$domain['active_alias_id'] = $alias['alias_id'];
$domain['redirect'] = (boolean) $alias['redirect'];
}
return $domain;
}
?>