function hook_allow_domain in Hostmaster (Aegir) 6
Determine if a site can be created using the specified domain.
The frontend will only create a specified domains if all implementations of this hook return TRUE, so in most cases you will be looking for domains that you don't allow, and fallback to a default position of allowing the domain.
Parameters
$url: The URL of the site that hosting wishes to create.
$params: An array of paramters that may contain information about the site. None of the keys are required however, so you should not depend on the value of any particular key in this array. If the array is not empty it will usually contain at least a 'nid' key whose value is the nid of the site being created.
Return value
Return TRUE/FALSE if you allow or deny the domain respectively.
See also
Related topics
2 functions implement hook_allow_domain()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- hosting_alias_allow_domain in modules/
hosting/ alias/ hosting_alias.module - Implementation of hook_allow_domain().
- hosting_site_allow_domain in modules/
hosting/ site/ hosting_site.module - Implementation of hook_allow_domain().
1 invocation of hook_allow_domain()
- hosting_domain_allowed in modules/
hosting/ hosting.module - Check site URL is allowed.
File
- modules/
hosting/ hosting.api.php, line 34 - Hooks provided by the hosting module, and some other random ones.
Code
function hook_allow_domain($url, $params) {
// Don't allow another drupal.org, it's special.
if ($url == 'drupal.org') {
return FALSE;
}
else {
return TRUE;
}
}