summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/api/kolab_api_service_form_value.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/api/kolab_api_service_form_value.php b/lib/api/kolab_api_service_form_value.php
index 2edee57..568c3b2 100644
--- a/lib/api/kolab_api_service_form_value.php
+++ b/lib/api/kolab_api_service_form_value.php
@@ -1654,6 +1654,7 @@ class kolab_api_service_form_value extends kolab_api_service
}
}
+ $domains = array_map('strtolower', $domains);
$domains = array_unique($domains);
Log::trace("_get_valid_domains result: " . var_export($domains, true));
@@ -1666,10 +1667,11 @@ class kolab_api_service_form_value extends kolab_api_service
$at_index = strrpos($mail_address, "@");
if (is_bool($at_index) && !$at_index) {
throw new Exception("Invalid email address: No domain name space", 235);
- } else {
- $email_domain = substr($mail_address, $at_index+1);
}
+ $email_domain = substr($mail_address, $at_index + 1);
+ $email_domain = strtolower($email_domain);
+
$my_primary_domain = $_SESSION['user']->get_domain();
if ($email_domain == $my_primary_domain) {
@@ -1677,7 +1679,7 @@ class kolab_api_service_form_value extends kolab_api_service
return true;
}
- $valid = false;
+ $valid = false;
Log::trace("_validate_email_address_in_any_of_mydomains(\$mail_address = " . var_export($mail_address, TRUE) . ")");
if (in_array($email_domain, $this->_get_valid_domains($my_primary_domain))) {
@@ -1692,5 +1694,4 @@ class kolab_api_service_form_value extends kolab_api_service
return $valid;
}
-
}