diff options
author | Arthur Schiwon <blizzz@owncloud.com> | 2012-10-15 20:46:42 +0400 |
---|---|---|
committer | Arthur Schiwon <blizzz@owncloud.com> | 2012-10-15 20:47:28 +0400 |
commit | 24ad6b5a62244bb107cf915e75e9f8d8866497ec (patch) | |
tree | 274b355debe16ebebf070005457abb4a888cd54d /apps | |
parent | 5708488b3e3a2e8c60ac6fe32724f36428c2abff (diff) |
LDAP: fix retrieval of Quota and Email
Diffstat (limited to 'apps')
-rw-r--r-- | apps/user_ldap/user_ldap.php | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/apps/user_ldap/user_ldap.php b/apps/user_ldap/user_ldap.php index 53a65129108..e104c8d1764 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]; } |