diff --git a/addressbook/inc/class.addressbook_univention.inc.php b/addressbook/inc/class.addressbook_univention.inc.php index 9ccfb7b516..347300d54b 100644 --- a/addressbook/inc/class.addressbook_univention.inc.php +++ b/addressbook/inc/class.addressbook_univention.inc.php @@ -23,4 +23,18 @@ class addressbook_univention extends addressbook_ldap ); parent::__construct($ldap_config, $ds); } + + /** + * saves the content of data to the db + * + * @param array $keys if given $keys are copied to data before saveing => allows a save as + * @return int 0 on success and errno != 0 else + */ + function save($keys=null) + { + // UCS lowercases email when storing + $keys['email'] = strtolower(!empty($keys['email']) ? $keys['email'] : $this->data['email']); + + return parent::save($keys); + } } diff --git a/phpgwapi/inc/class.accounts_univention.inc.php b/phpgwapi/inc/class.accounts_univention.inc.php index dbd7dc1828..a45549d3ee 100644 --- a/phpgwapi/inc/class.accounts_univention.inc.php +++ b/phpgwapi/inc/class.accounts_univention.inc.php @@ -47,6 +47,9 @@ class accounts_univention extends accounts_ldap */ function save(&$data) { + // UCS lowercases email when storing + $data['account_email'] = strtolower($data['account_email']); + if (self::available()) { $config = $this->frontend->config && $this->frontend->config['ldap_context'] ?