[Pkg-owncloud-commits] [owncloud] 56/75: LDAP: set also quota, when there is no explicit default value

David Prévot taffit at alioth.debian.org
Fri Nov 8 23:08:41 UTC 2013


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to annotated tag v3.0.1
in repository owncloud.

commit 838dfe14e5d196a67b20509b027de4e1a22e2a85
Author: Arthur Schiwon <blizzz at owncloud.com>
Date:   Thu Mar 1 14:31:06 2012 +0100

    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 3de5eba..3521a9d 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);
 		}
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list