diff options
author | Arthur Schiwon <blizzz@owncloud.com> | 2012-08-30 14:54:52 +0200 |
---|---|---|
committer | Arthur Schiwon <blizzz@owncloud.com> | 2012-08-30 14:55:07 +0200 |
commit | 2440e500b854268beb320147f64c468b20eacbc4 (patch) | |
tree | 471f17a5f37babe6d5b012ccb8f51ed71ea47bfb /apps | |
parent | f2534e7428be3b67273a45fc17dd628f0b3d4684 (diff) | |
download | nextcloud-server-2440e500b854268beb320147f64c468b20eacbc4.tar.gz nextcloud-server-2440e500b854268beb320147f64c468b20eacbc4.zip |
LDAP: on upgrade set homeDirs of users where it is not set. Avoids new folders (empty), depending on the configuration
Diffstat (limited to 'apps')
-rw-r--r-- | apps/user_ldap/appinfo/update.php | 4 | ||||
-rw-r--r-- | apps/user_ldap/appinfo/version | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/apps/user_ldap/appinfo/update.php b/apps/user_ldap/appinfo/update.php index f06655c1dc1..a05293f2288 100644 --- a/apps/user_ldap/appinfo/update.php +++ b/apps/user_ldap/appinfo/update.php @@ -34,7 +34,7 @@ $groupBE = new \OCA\user_ldap\GROUP_LDAP(); $groupBE->setConnector($connector); foreach($objects as $object) { - $fetchDNSql = 'SELECT `ldap_dn` FROM `*PREFIX*ldap_'.$object.'_mapping`'; + $fetchDNSql = 'SELECT `ldap_dn`, `owncloud_name` FROM `*PREFIX*ldap_'.$object.'_mapping`'; $updateSql = 'UPDATE `*PREFIX*ldap_'.$object.'_mapping` SET `ldap_DN` = ?, `directory_uuid` = ? WHERE `ldap_dn` = ?'; $query = OCP\DB::prepare($fetchDNSql); @@ -45,6 +45,8 @@ foreach($objects as $object) { $newDN = mb_strtolower($dn['ldap_dn'], 'UTF-8'); if($object == 'user') { $uuid = $userBE->getUUID($newDN); + //fix home folder to avoid new ones depending on the configuration + $userBE->getHome($dn['owncloud_name']); } else { $uuid = $groupBE->getUUID($newDN); } diff --git a/apps/user_ldap/appinfo/version b/apps/user_ldap/appinfo/version index e689e4949ef..b810fec9868 100644 --- a/apps/user_ldap/appinfo/version +++ b/apps/user_ldap/appinfo/version @@ -1 +1 @@ -0.2.0.26
\ No newline at end of file +0.2.0.28
\ No newline at end of file |