aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorblizzz <blizzz@arthur-schiwon.de>2021-06-28 19:13:05 +0200
committerGitHub <noreply@github.com>2021-06-28 19:13:05 +0200
commit73c5738ac7ad124419a26b51e4f5c69325919eff (patch)
tree868d0c4eec940da99edee1c39166ee8df8d3cc25
parent583e5972374f577bdf60b5a0f5cc9ebac0a60afb (diff)
parentbbcd8c9a6850ad4a55ead19c75b67a90488c6140 (diff)
downloadnextcloud-server-73c5738ac7ad124419a26b51e4f5c69325919eff.tar.gz
nextcloud-server-73c5738ac7ad124419a26b51e4f5c69325919eff.zip
Merge pull request #27698 from nextcloud/fix/25761/userexistsonldap-loop
LDAP: determine shares of offline users only when needed
-rw-r--r--apps/user_ldap/lib/User/OfflineUser.php10
1 files changed, 3 insertions, 7 deletions
diff --git a/apps/user_ldap/lib/User/OfflineUser.php b/apps/user_ldap/lib/User/OfflineUser.php
index 0c9e6e73ff3..4adf5302bfe 100644
--- a/apps/user_ldap/lib/User/OfflineUser.php
+++ b/apps/user_ldap/lib/User/OfflineUser.php
@@ -146,7 +146,8 @@ class OfflineUser {
*/
public function getDN() {
if ($this->dn === null) {
- $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 ($this->hasActiveShares === null) {
- $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();
}
/**