LDAP: fix settings handling of homeFolderNamingRule option
This commit is contained in:
parent
993831b6df
commit
af2acadc66
|
@ -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':
|
||||||
|
|
Loading…
Reference in New Issue