aboutsummaryrefslogtreecommitdiffstats
path: root/apps/user_ldap
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@owncloud.com>2012-03-01 14:31:06 +0100
committerArthur Schiwon <blizzz@owncloud.com>2012-03-01 14:31:06 +0100
commitfa6ad6ba68ac671375b50971a92a61dc43e250c7 (patch)
tree58a0663c60d6a1e3ff6998063d39e762da2ad7a8 /apps/user_ldap
parentb192f86d84866fab1d7c440d9dad35798f352353 (diff)
downloadnextcloud-server-fa6ad6ba68ac671375b50971a92a61dc43e250c7.tar.gz
nextcloud-server-fa6ad6ba68ac671375b50971a92a61dc43e250c7.zip
LDAP: set also quota, when there is no explicit default value
Diffstat (limited to 'apps/user_ldap')
-rw-r--r--apps/user_ldap/user_ldap.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/apps/user_ldap/user_ldap.php b/apps/user_ldap/user_ldap.php
index 3de5ebacd36..3521a9d90cf 100644
--- a/apps/user_ldap/user_ldap.php
+++ b/apps/user_ldap/user_ldap.php
@@ -81,7 +81,11 @@ class OC_USER_LDAP extends OC_User_Backend {
if( !$this->ldap_dc )
return false;
- $quota = $this->ldap_dc[strtolower($this->ldap_quota_attr)][0];
+ if(!empty($this->ldap_quota_attr)) {
+ $quota = $this->ldap_dc[strtolower($this->ldap_quota_attr)][0];
+ } else {
+ $quota = false;
+ }
$quota = $quota != -1 ? $quota : $this->ldap_quota_def;
OC_Preferences::setValue($uid, 'files', 'quota', OC_Helper::computerFileSize($quota));
}
@@ -154,7 +158,7 @@ class OC_USER_LDAP extends OC_User_Backend {
return false;
}
- if(!empty($this->ldap_quota_attr) && !empty($this->ldap_quota_def)) {
+ if(!empty($this->ldap_quota_attr) || !empty($this->ldap_quota_def)) {
$this->setQuota($uid);
}