[Pkg-owncloud-commits] [owncloud] 55/75: LDAP fix: set user quota, if attribute is provided
David Prévot
taffit at alioth.debian.org
Fri Nov 8 23:08:40 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 2ca1ba0384a473d1d47f3b030cbc85410c21b64f
Author: Arthur Schiwon <blizzz at owncloud.com>
Date: Thu Mar 1 14:18:28 2012 +0100
LDAP fix: set user quota, if attribute is provided
---
apps/user_ldap/user_ldap.php | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/apps/user_ldap/user_ldap.php b/apps/user_ldap/user_ldap.php
index fbc87f1..3de5eba 100644
--- a/apps/user_ldap/user_ldap.php
+++ b/apps/user_ldap/user_ldap.php
@@ -81,9 +81,9 @@ class OC_USER_LDAP extends OC_User_Backend {
if( !$this->ldap_dc )
return false;
- $quota = $this->ldap_dc[$this->ldap_quota_attr][0];
+ $quota = $this->ldap_dc[strtolower($this->ldap_quota_attr)][0];
$quota = $quota != -1 ? $quota : $this->ldap_quota_def;
- OC_Preferences::setValue($uid, 'files', 'quota', $quota);
+ OC_Preferences::setValue($uid, 'files', 'quota', OC_Helper::computerFileSize($quota));
}
private function setEmail( $uid ) {
@@ -154,7 +154,7 @@ class OC_USER_LDAP extends OC_User_Backend {
return false;
}
- if(!empty($this->ldap_quota) && !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