[Pkg-owncloud-commits] [owncloud] 40/67: LDAP: fix retrieval of Quota and Email
David Prévot
taffit at alioth.debian.org
Fri Nov 8 23:10:39 UTC 2013
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to annotated tag v4.5.1
in repository owncloud.
commit e49d5a5f9ac0833d78f698c422c42a55c912fb41
Author: Arthur Schiwon <blizzz at owncloud.com>
Date: Mon Oct 15 18:46:42 2012 +0200
LDAP: fix retrieval of Quota and Email
---
apps/user_ldap/user_ldap.php | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/apps/user_ldap/user_ldap.php b/apps/user_ldap/user_ldap.php
index 53a6512..e104c8d 100644
--- a/apps/user_ldap/user_ldap.php
+++ b/apps/user_ldap/user_ldap.php
@@ -29,11 +29,13 @@ class USER_LDAP extends lib\Access implements \OCP\UserInterface {
private function updateQuota($dn) {
$quota = null;
- if(!empty($this->connection->ldapQuotaDefault)) {
- $quota = $this->connection->ldapQuotaDefault;
+ $quotaDefault = $this->connection->ldapQuotaDefault;
+ $quotaAttribute = $this->connection->ldapQuotaAttribute;
+ if(!empty($quotaDefault)) {
+ $quota = $quotaDefault;
}
- if(!empty($this->connection->ldapQuotaAttribute)) {
- $aQuota = $this->readAttribute($dn, $this->connection->ldapQuotaAttribute);
+ if(!empty($quotaAttribute)) {
+ $aQuota = $this->readAttribute($dn, $quotaAttribute);
if($aQuota && (count($aQuota) > 0)) {
$quota = $aQuota[0];
@@ -46,8 +48,9 @@ class USER_LDAP extends lib\Access implements \OCP\UserInterface {
private function updateEmail($dn) {
$email = null;
- if(!empty($this->connection->ldapEmailAttribute)) {
- $aEmail = $this->readAttribute($dn, $this->connection->ldapEmailAttribute);
+ $emailAttribute = $this->connection->ldapEmailAttribute;
+ if(!empty($emailAttribute)) {
+ $aEmail = $this->readAttribute($dn, $emailAttribute);
if($aEmail && (count($aEmail) > 0)) {
$email = $aEmail[0];
}
--
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