LDAP: set also quota, when there is no explicit default value
This commit is contained in:
parent
b192f86d84
commit
fa6ad6ba68
|
@ -81,7 +81,11 @@ class OC_USER_LDAP extends OC_User_Backend {
|
|||
if( !$this->ldap_dc )
|
||||
return false;
|
||||
|
||||
$quota = $this->ldap_dc[strtolower($this->ldap_quota_attr)][0];
|
||||
if(!empty($this->ldap_quota_attr)) {
|
||||
$quota = $this->ldap_dc[strtolower($this->ldap_quota_attr)][0];
|
||||
} else {
|
||||
$quota = false;
|
||||
}
|
||||
$quota = $quota != -1 ? $quota : $this->ldap_quota_def;
|
||||
OC_Preferences::setValue($uid, 'files', 'quota', OC_Helper::computerFileSize($quota));
|
||||
}
|
||||
|
@ -154,7 +158,7 @@ class OC_USER_LDAP extends OC_User_Backend {
|
|||
return false;
|
||||
}
|
||||
|
||||
if(!empty($this->ldap_quota_attr) && !empty($this->ldap_quota_def)) {
|
||||
if(!empty($this->ldap_quota_attr) || !empty($this->ldap_quota_def)) {
|
||||
$this->setQuota($uid);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue