LDAP: fix settings handling of homeFolderNamingRule option

This commit is contained in:
Arthur Schiwon 2013-02-06 13:04:35 +01:00
parent 993831b6df
commit af2acadc66
1 changed files with 6 additions and 1 deletions

View File

@ -294,6 +294,11 @@ class Connection {
$params = $this->getConfigTranslationArray(); $params = $this->getConfigTranslationArray();
foreach($config as $parameter => $value) { foreach($config as $parameter => $value) {
if(($parameter == 'homeFolderNamingRule'
|| $params[$parameter] == 'homeFolderNamingRule')
&& !empty($value)) {
$value = 'attr:'.$value;
}
if(isset($this->config[$parameter])) { if(isset($this->config[$parameter])) {
$this->config[$parameter] = $value; $this->config[$parameter] = $value;
if(is_array($setParameters)) { if(is_array($setParameters)) {
@ -324,7 +329,7 @@ class Connection {
$value = base64_encode($value); $value = base64_encode($value);
break; break;
case 'homeFolderNamingRule': case 'homeFolderNamingRule':
$value = empty($value) ? 'opt:username' : 'attr:'.$value; $value = empty($value) ? 'opt:username' : $value;
break; break;
case 'ldapBase': case 'ldapBase':
case 'ldapBaseUsers': case 'ldapBaseUsers':