mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
LDAP: determine shares of offline users only when needed
- determine shares may via Sharing code result in user exists checks - this may result in an infinite loop when user exists was called before - the info is really only required at one occ command Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
This commit is contained in:
parent
c4a20d3d5d
commit
de3aa22057
1 changed files with 3 additions and 7 deletions
|
|
@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue