summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-09-18 13:58:22 +0100
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-09-18 13:59:04 +0100
commit4f2135208e913d9a91002161f1bcc2e6952358ed (patch)
tree629e1bcca4bbb4dcc08a73ef9db0e2d0b959b8bc
parent1cb9a4f8e2ec71f69cf7659c6db85dc971cb3067 (diff)
downloadwebadmin-4f2135208e913d9a91002161f1bcc2e6952358ed.tar.gz
Introduce a new setting [$domain]/hosted_parent_domain_only that will control whether a registration form displays any of the domain aliases for $domain
-rw-r--r--lib/hosted/kolab_client_task_signup.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/hosted/kolab_client_task_signup.php b/lib/hosted/kolab_client_task_signup.php
index c23ed5e..4bcc194 100644
--- a/lib/hosted/kolab_client_task_signup.php
+++ b/lib/hosted/kolab_client_task_signup.php
@@ -293,7 +293,13 @@ class kolab_client_task_signup extends kolab_client_task
$domain_name = $domain_attrs[$domain_name_attribute];
}
- $domain_names = array_merge($domain_names, $_domain_names);
+ $parent_domain_only = $this->config->get($domain_name, 'hosted_parent_domain_only');
+
+ if (!empty($parent_domain_only) && in_array(strtolower($parent_domain_only), array('1', 'yes', 'true'))) {
+ $domain_names = array_merge($domain_names, array($domain_name));
+ } else {
+ $domain_names = array_merge($domain_names, $_domain_names);
+ }
}
// prepare array with proper key ids for form building