]> source.dussan.org Git - nextcloud-server.git/commitdiff
LDAP: get rid of some PHP Warnings
authorArthur Schiwon <blizzz@owncloud.com>
Tue, 10 Sep 2013 15:39:29 +0000 (17:39 +0200)
committerArthur Schiwon <blizzz@owncloud.com>
Fri, 27 Sep 2013 11:34:15 +0000 (13:34 +0200)
apps/user_ldap/lib/connection.php

index 0bf13a19377bcfff107859c8bd9290d62a4e1322..053ec7e2355964ce54986ff0cab0ec5ee0a0c25b 100644 (file)
@@ -396,7 +396,7 @@ class Connection extends LDAPUtility {
        public function saveConfiguration() {
                $trans = array_flip($this->getConfigTranslationArray());
                foreach($this->config as $key => $value) {
-                       \OCP\Util::writeLog('user_ldap', 'LDAP: storing key '.$key.' value '.$value, \OCP\Util::DEBUG);
+                       \OCP\Util::writeLog('user_ldap', 'LDAP: storing key '.$key.' value '.print_r($value, true), \OCP\Util::DEBUG);
                        switch ($key) {
                                case 'ldapAgentPassword':
                                        $value = base64_encode($value);
@@ -441,6 +441,11 @@ class Connection extends LDAPUtility {
                                        $config[$dbKey] = '';
                                }
                                continue;
+                       } else if((strpos($classKey, 'ldapBase') !== false
+                                               || strpos($classKey, 'ldapAttributes') !== false)
+                                               && is_array($this->config[$classKey])) {
+                               $config[$dbKey] = implode("\n", $this->config[$classKey]);
+                               continue;
                        }
                        $config[$dbKey] = $this->config[$classKey];
                }