Merge pull request #27703 from nextcloud/backport/27698/stable21

[stable21] LDAP: determine shares of offline users only when needed
This commit is contained in:
John Molakvoæ 2021-06-29 08:27:44 +02:00 committed by GitHub
commit b614af016a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -146,7 +146,8 @@ class OfflineUser {
*/
public function getDN() {
if (!isset($this->dn)) {
$this->fetchDetails();
$dn = $this->mapping->getDNByName($this->ocName);
$this->dn = ($dn !== false) ? $dn : '';
}
return $this->dn;
}
@ -212,7 +213,7 @@ class OfflineUser {
*/
public function getHasActiveShares() {
if (!isset($this->hasActiveShares)) {
$this->fetchDetails();
$this->determineShares();
}
return $this->hasActiveShares;
}
@ -232,11 +233,6 @@ class OfflineUser {
foreach ($properties as $property => $app) {
$this->$property = $this->config->getUserValue($this->ocName, $app, $property, '');
}
$dn = $this->mapping->getDNByName($this->ocName);
$this->dn = ($dn !== false) ? $dn : '';
$this->determineShares();
}
/**