summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@owncloud.com>2013-02-06 13:04:35 +0100
committerArthur Schiwon <blizzz@owncloud.com>2013-02-06 13:04:35 +0100
commitaf2acadc6602b2ebd33a8b7d74d82e1590870c0a (patch)
tree7a065dc3f7c7e0bad5c4a55f91843f9a71c0448d /apps/user_ldap
parent993831b6df5e7df1a6fcc7344f1fecd93006674c (diff)
downloadnextcloud-server-af2acadc6602b2ebd33a8b7d74d82e1590870c0a.tar.gz
nextcloud-server-af2acadc6602b2ebd33a8b7d74d82e1590870c0a.zip
LDAP: fix settings handling of homeFolderNamingRule option
Diffstat (limited to 'apps/user_ldap')
-rw-r--r--apps/user_ldap/lib/connection.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/apps/user_ldap/lib/connection.php b/apps/user_ldap/lib/connection.php
index acc33e047c6..63d0f2ac20e 100644
--- a/apps/user_ldap/lib/connection.php
+++ b/apps/user_ldap/lib/connection.php
@@ -294,6 +294,11 @@ class Connection {
$params = $this->getConfigTranslationArray();
foreach($config as $parameter => $value) {
+ if(($parameter == 'homeFolderNamingRule'
+ || $params[$parameter] == 'homeFolderNamingRule')
+ && !empty($value)) {
+ $value = 'attr:'.$value;
+ }
if(isset($this->config[$parameter])) {
$this->config[$parameter] = $value;
if(is_array($setParameters)) {
@@ -324,7 +329,7 @@ class Connection {
$value = base64_encode($value);
break;
case 'homeFolderNamingRule':
- $value = empty($value) ? 'opt:username' : 'attr:'.$value;
+ $value = empty($value) ? 'opt:username' : $value;
break;
case 'ldapBase':
case 'ldapBaseUsers':