diff --git a/lib/private/Accounts/AccountManager.php b/lib/private/Accounts/AccountManager.php index 7f177e9c65..a057cb4fc2 100644 --- a/lib/private/Accounts/AccountManager.php +++ b/lib/private/Accounts/AccountManager.php @@ -330,7 +330,7 @@ class AccountManager implements IAccountManager { private function parseAccountData(IUser $user, $data): Account { $account = new Account($user); foreach($data as $property => $accountData) { - $account->setProperty($property, $accountData['value'], $accountData['scope'], $accountData['verified']); + $account->setProperty($property, $accountData['value'] ?? '', $accountData['scope'], $accountData['verified']); } return $account; } diff --git a/lib/private/Server.php b/lib/private/Server.php index e0bd808428..32d7705919 100644 --- a/lib/private/Server.php +++ b/lib/private/Server.php @@ -124,6 +124,7 @@ use OC\Dashboard\DashboardManager; use OCA\Theming\ImageManager; use OCA\Theming\ThemingDefaults; +use OCP\Accounts\IAccountManager; use OCP\App\IAppManager; use OCP\AppFramework\Utility\ITimeFactory; use OCP\Collaboration\AutoComplete\IManager; @@ -1175,6 +1176,7 @@ class Server extends ServerContainer implements IServerContainer { ); }); $this->registerAlias(IContactsStore::class, ContactsStore::class); + $this->registerAlias(IAccountManager::class, AccountManager::class); $this->registerService(IStorageFactory::class, function() { return new StorageFactory(); diff --git a/lib/public/Accounts/IAccount.php b/lib/public/Accounts/IAccount.php index 0fa8f6e53e..6bf4988a9f 100644 --- a/lib/public/Accounts/IAccount.php +++ b/lib/public/Accounts/IAccount.php @@ -78,7 +78,7 @@ interface IAccount extends \JsonSerializable { * @param string $verified \OCP\Accounts\IAccountManager::NOT_VERIFIED | \OCP\Accounts\IAccountManager::VERIFICATION_IN_PROGRESS | \OCP\Accounts\IAccountManager::VERIFIED * @return IAccountProperty[] */ - public function getFilteredProperties(string $scope, string $verified): array; + public function getFilteredProperties(string $scope = null, string $verified = null): array; /** * Get the related user for the account data