mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-26 09:53:20 +01:00
- removed getUserMailboxString from cyrusimap, as it is identical to defaultimap, beside lowercasing usernames, which is not generic
- fixed typo in emailadmin_smtp_ldap::addAccount ($this->domain instead of $this->defaultDomain) creating new accounts with missing domain in mailbox attribute - fixed emailadmin_smtp_ldap::setUserData to use new mailbox_addr method
This commit is contained in:
parent
26cea9e1bd
commit
50f6d8dcff
@ -104,30 +104,6 @@ class cyrusimap extends defaultimap
|
|||||||
return count($mboxes);
|
return count($mboxes);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Create mailbox string from given mailbox-name and user-name
|
|
||||||
*
|
|
||||||
* @param string $_username
|
|
||||||
* @param string $_folderName=''
|
|
||||||
* @return string utf-7 encoded (done in getMailboxName)
|
|
||||||
*/
|
|
||||||
function getUserMailboxString($_username, $_folderName='')
|
|
||||||
{
|
|
||||||
$nameSpaces = $this->getNameSpaces();
|
|
||||||
|
|
||||||
if(!isset($nameSpaces['others'])) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
$_username = $this->getMailBoxUserName($_username);
|
|
||||||
$mailboxString = $nameSpaces['others'][0]['name'] . strtolower($_username) . (!empty($_folderName) ? $nameSpaces['others'][0]['delimiter'] . $_folderName : '');
|
|
||||||
|
|
||||||
if($this->loginType == 'vmailmgr' || $this->loginType == 'email') {
|
|
||||||
$mailboxString .= '@'.$this->domainName;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $mailboxString;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* returns information about a user
|
* returns information about a user
|
||||||
* currently only supported information is the current quota
|
* currently only supported information is the current quota
|
||||||
|
@ -351,7 +351,11 @@ class emailadmin_smtp_ldap extends defaultsmtp
|
|||||||
// does schema support an explicit mailbox name --> set it with $uid@$domain
|
// does schema support an explicit mailbox name --> set it with $uid@$domain
|
||||||
if ($this->config['mailbox_attr'])
|
if ($this->config['mailbox_attr'])
|
||||||
{
|
{
|
||||||
$newData[$this->config['mailbox_attr']] = $uid.'@'.$this->defaultDomain;
|
$newData[$this->config['mailbox_attr']] = self::mailbox_addr(array(
|
||||||
|
'account_id' => $_uidnumber,
|
||||||
|
'account_lid' => $uid,
|
||||||
|
'account_email' => $_mailLocalAddress,
|
||||||
|
));
|
||||||
}
|
}
|
||||||
if ($this->debug) error_log(__METHOD__.'('.array2string(func_get_args()).") --> ldap_mod_replace(,'$accountDN',".array2string($newData).')');
|
if ($this->debug) error_log(__METHOD__.'('.array2string(func_get_args()).") --> ldap_mod_replace(,'$accountDN',".array2string($newData).')');
|
||||||
|
|
||||||
@ -433,7 +437,7 @@ class emailadmin_smtp_ldap extends defaultsmtp
|
|||||||
*/
|
*/
|
||||||
/*static*/ public function mailbox_addr($account,$domain=null,$mail_login_type=null)
|
/*static*/ public function mailbox_addr($account,$domain=null,$mail_login_type=null)
|
||||||
{
|
{
|
||||||
if (is_null($domain)) $domain = $this->domain;
|
if (is_null($domain)) $domain = $this->defaultDomain;
|
||||||
if (is_null($mail_login_type)) $mail_login_type = $GLOBALS['egw_info']['server']['mail_login_type'];
|
if (is_null($mail_login_type)) $mail_login_type = $GLOBALS['egw_info']['server']['mail_login_type'];
|
||||||
|
|
||||||
switch($mail_login_type)
|
switch($mail_login_type)
|
||||||
@ -457,9 +461,8 @@ class emailadmin_smtp_ldap extends defaultsmtp
|
|||||||
$mbox .= '@'.$domain;
|
$mbox .= '@'.$domain;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
//strtolower breaks CaseSensitive Authentication
|
if ($this->debug) error_log(__METHOD__."(".array2string($account).",'$domain','$mail_login_type') = '$mbox'");
|
||||||
//$mbox = strtolower($mbox);
|
|
||||||
|
|
||||||
return $mbox;
|
return $mbox;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user