Changeset View
Changeset View
Standalone View
Standalone View
lib/api/kolab_api_service_form_value.php
Show First 20 Lines • Show All 1,270 Lines • ▼ Show 20 Lines | private function validate_mail($value, $postdata = array(), $validation_type = null) | ||||
// spaces if indeed it is listed as a mail attribute. | // spaces if indeed it is listed as a mail attribute. | ||||
if (in_array('mail', $conf->get_list('mail_attributes'))) { | if (in_array('mail', $conf->get_list('mail_attributes'))) { | ||||
if (!$this->_validate_email_address_in_any_of_my_domains($mail_address)) { | if (!$this->_validate_email_address_in_any_of_my_domains($mail_address)) { | ||||
throw new Exception("Email address '$mail_address' not in local domain", 693); | throw new Exception("Email address '$mail_address' not in local domain", 693); | ||||
} | } | ||||
} | } | ||||
} | } | ||||
// Check if addresses are not already in use | |||||
if ($validation_type == self::VALIDATE_EXTENDED) { | |||||
$this->_email_addresses_in_use($value, 'mail', $postdata); | |||||
} | |||||
vanmeeuwen: This should be part of the foreach routine a couple of lines earlier. | |||||
return 'OK'; | return 'OK'; | ||||
} | } | ||||
private function validate_mailquota($value, $postdata = array(), $validation_type = null) | private function validate_mailquota($value, $postdata = array(), $validation_type = null) | ||||
{ | { | ||||
// convert MB/GB into KB | // convert MB/GB into KB | ||||
if (preg_match('/^([0-9]+)\s*(KB|MB|GB)$/i', $value, $m)) { | if (preg_match('/^([0-9]+)\s*(KB|MB|GB)$/i', $value, $m)) { | ||||
switch (strtoupper($m[2])) { | switch (strtoupper($m[2])) { | ||||
▲ Show 20 Lines • Show All 405 Lines • Show Last 20 Lines |
This should be part of the foreach routine a couple of lines earlier.