UCS lowercases email when storing

This commit is contained in:
Ralf Becker 2015-09-18 07:18:58 +00:00
parent 5f19cc95fc
commit 3b596f061e
2 changed files with 17 additions and 0 deletions

View File

@ -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);
}
}

View File

@ -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'] ?