mirror of
https://github.com/nextcloud/server.git
synced 2026-06-12 10:10:49 -04:00
split instantiation from business logic in OfflineUser
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
This commit is contained in:
parent
1f47b27a49
commit
8b18a11948
1 changed files with 24 additions and 1 deletions
|
|
@ -89,7 +89,6 @@ class OfflineUser {
|
|||
$this->config = $config;
|
||||
$this->db = $db;
|
||||
$this->mapping = $mapping;
|
||||
$this->fetchDetails();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -131,6 +130,9 @@ class OfflineUser {
|
|||
* @return string
|
||||
*/
|
||||
public function getUID() {
|
||||
if (!isset($this->uid)) {
|
||||
$this->fetchDetails();
|
||||
}
|
||||
return $this->uid;
|
||||
}
|
||||
|
||||
|
|
@ -139,6 +141,9 @@ class OfflineUser {
|
|||
* @return string
|
||||
*/
|
||||
public function getDN() {
|
||||
if (!isset($this->dn)) {
|
||||
$this->fetchDetails();
|
||||
}
|
||||
return $this->dn;
|
||||
}
|
||||
|
||||
|
|
@ -147,6 +152,9 @@ class OfflineUser {
|
|||
* @return string
|
||||
*/
|
||||
public function getDisplayName() {
|
||||
if (!isset($this->displayName)) {
|
||||
$this->fetchDetails();
|
||||
}
|
||||
return $this->displayName;
|
||||
}
|
||||
|
||||
|
|
@ -155,6 +163,9 @@ class OfflineUser {
|
|||
* @return string
|
||||
*/
|
||||
public function getEmail() {
|
||||
if (!isset($this->email)) {
|
||||
$this->fetchDetails();
|
||||
}
|
||||
return $this->email;
|
||||
}
|
||||
|
||||
|
|
@ -163,6 +174,9 @@ class OfflineUser {
|
|||
* @return string
|
||||
*/
|
||||
public function getHomePath() {
|
||||
if (!isset($this->homePath)) {
|
||||
$this->fetchDetails();
|
||||
}
|
||||
return $this->homePath;
|
||||
}
|
||||
|
||||
|
|
@ -171,6 +185,9 @@ class OfflineUser {
|
|||
* @return int
|
||||
*/
|
||||
public function getLastLogin() {
|
||||
if (!isset($this->lastLogin)) {
|
||||
$this->fetchDetails();
|
||||
}
|
||||
return (int)$this->lastLogin;
|
||||
}
|
||||
|
||||
|
|
@ -179,6 +196,9 @@ class OfflineUser {
|
|||
* @return int
|
||||
*/
|
||||
public function getDetectedOn() {
|
||||
if (!isset($this->foundDeleted)) {
|
||||
$this->fetchDetails();
|
||||
}
|
||||
return (int)$this->foundDeleted;
|
||||
}
|
||||
|
||||
|
|
@ -187,6 +207,9 @@ class OfflineUser {
|
|||
* @return bool
|
||||
*/
|
||||
public function getHasActiveShares() {
|
||||
if (!isset($this->hasActiveShares)) {
|
||||
$this->fetchDetails();
|
||||
}
|
||||
return $this->hasActiveShares;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue