Skip to content
Snippets Groups Projects
Commit 24ad6b5a authored by Arthur Schiwon's avatar Arthur Schiwon
Browse files

LDAP: fix retrieval of Quota and Email

parent 5708488b
No related branches found
No related tags found
No related merge requests found
......@@ -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];
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment