Browse Source
Merge pull request #37346 from nextcloud/fix/34557/undefined-getExtStorageHome
fix undefined method getExtStorageHome()
pull/37432/head
Arthur Schiwon
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
10 additions and
1 deletions
-
apps/user_ldap/lib/Handler/ExtStorageConfigHandler.php
-
apps/user_ldap/lib/User/OfflineUser.php
|
|
|
@ -62,7 +62,7 @@ class ExtStorageConfigHandler extends UserContext implements IConfigHandler { |
|
|
|
} |
|
|
|
|
|
|
|
$ldapUser = $access->userManager->get($user->getUID()); |
|
|
|
$extHome = $ldapUser->getExtStorageHome(); |
|
|
|
$extHome = $ldapUser !== null ? $ldapUser->getExtStorageHome() : ''; |
|
|
|
|
|
|
|
return $this->processInput($optionValue, $extHome); |
|
|
|
} |
|
|
|
|
|
|
|
@ -60,6 +60,7 @@ class OfflineUser { |
|
|
|
* @var string $foundDeleted the timestamp when the user was detected as unavailable |
|
|
|
*/ |
|
|
|
protected $foundDeleted; |
|
|
|
protected ?string $extStorageHome = null; |
|
|
|
/** |
|
|
|
* @var string $email |
|
|
|
*/ |
|
|
|
@ -207,6 +208,13 @@ class OfflineUser { |
|
|
|
return (int)$this->foundDeleted; |
|
|
|
} |
|
|
|
|
|
|
|
public function getExtStorageHome(): string { |
|
|
|
if ($this->extStorageHome === null) { |
|
|
|
$this->fetchDetails(); |
|
|
|
} |
|
|
|
return (string)$this->extStorageHome; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* getter for having active shares |
|
|
|
* @return bool |
|
|
|
@ -227,6 +235,7 @@ class OfflineUser { |
|
|
|
'uid' => 'user_ldap', |
|
|
|
'homePath' => 'user_ldap', |
|
|
|
'foundDeleted' => 'user_ldap', |
|
|
|
'extStorageHome' => 'user_ldap', |
|
|
|
'email' => 'settings', |
|
|
|
'lastLogin' => 'login', |
|
|
|
]; |
|
|
|
|