From fa6ad6ba68ac671375b50971a92a61dc43e250c7 Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Thu, 1 Mar 2012 14:31:06 +0100 Subject: [PATCH] LDAP: set also quota, when there is no explicit default value --- apps/user_ldap/user_ldap.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/apps/user_ldap/user_ldap.php b/apps/user_ldap/user_ldap.php index 3de5ebacd3..3521a9d90c 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); }