LDAP fix: set user quota, if attribute is provided
This commit is contained in:
parent
f193e474c1
commit
eb8ffd9315
1 changed files with 3 additions and 3 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue