summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2020-10-26 13:54:03 +0100
committerArthur Schiwon <blizzz@arthur-schiwon.de>2020-10-26 16:05:28 +0100
commit2e455f632a9ed9003a624c0a06ab81eaf493ab23 (patch)
tree703043181d607bae9434cd17943a45ed2cb72579 /apps/user_ldap
parent002c56de17a229ea50bb9a9095b2682c1bece3a6 (diff)
downloadnextcloud-server-2e455f632a9ed9003a624c0a06ab81eaf493ab23.tar.gz
nextcloud-server-2e455f632a9ed9003a624c0a06ab81eaf493ab23.zip
split instantiation from business logic in OfflineUser
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'apps/user_ldap')
-rw-r--r--apps/user_ldap/lib/User/OfflineUser.php25
1 files changed, 24 insertions, 1 deletions
diff --git a/apps/user_ldap/lib/User/OfflineUser.php b/apps/user_ldap/lib/User/OfflineUser.php
index 1abef861852..6827fa09301 100644
--- a/apps/user_ldap/lib/User/OfflineUser.php
+++ b/apps/user_ldap/lib/User/OfflineUser.php
@@ -90,7 +90,6 @@ class OfflineUser {
$this->config = $config;
$this->db = $db;
$this->mapping = $mapping;
- $this->fetchDetails();
}
/**
@@ -132,6 +131,9 @@ class OfflineUser {
* @return string
*/
public function getUID() {
+ if (!isset($this->uid)) {
+ $this->fetchDetails();
+ }
return $this->uid;
}
@@ -140,6 +142,9 @@ class OfflineUser {
* @return string
*/
public function getDN() {
+ if (!isset($this->dn)) {
+ $this->fetchDetails();
+ }
return $this->dn;
}
@@ -148,6 +153,9 @@ class OfflineUser {
* @return string
*/
public function getDisplayName() {
+ if (!isset($this->displayName)) {
+ $this->fetchDetails();
+ }
return $this->displayName;
}
@@ -156,6 +164,9 @@ class OfflineUser {
* @return string
*/
public function getEmail() {
+ if (!isset($this->email)) {
+ $this->fetchDetails();
+ }
return $this->email;
}
@@ -164,6 +175,9 @@ class OfflineUser {
* @return string
*/
public function getHomePath() {
+ if (!isset($this->homePath)) {
+ $this->fetchDetails();
+ }
return $this->homePath;
}
@@ -172,6 +186,9 @@ class OfflineUser {
* @return int
*/
public function getLastLogin() {
+ if (!isset($this->lastLogin)) {
+ $this->fetchDetails();
+ }
return (int)$this->lastLogin;
}
@@ -180,6 +197,9 @@ class OfflineUser {
* @return int
*/
public function getDetectedOn() {
+ if (!isset($this->foundDeleted)) {
+ $this->fetchDetails();
+ }
return (int)$this->foundDeleted;
}
@@ -188,6 +208,9 @@ class OfflineUser {
* @return bool
*/
public function getHasActiveShares() {
+ if (!isset($this->hasActiveShares)) {
+ $this->fetchDetails();
+ }
return $this->hasActiveShares;
}