diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2018-10-24 13:49:00 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-24 13:49:00 +0200 |
commit | 5cdc85cf66a1278369557b830021294f121aacd0 (patch) | |
tree | e1ae981ac69bc44d27ef831012648ddb46852487 | |
parent | b3a0d871174268f23e6edaf41a4fd615459d8f22 (diff) | |
parent | f47f5ad0ea86ff216dcbf898e7d17ece0225c01e (diff) | |
download | nextcloud-server-5cdc85cf66a1278369557b830021294f121aacd0.tar.gz nextcloud-server-5cdc85cf66a1278369557b830021294f121aacd0.zip |
Merge pull request #12013 from nextcloud/bugfix/noid/accountmanager
Fix small issues with IAccountManager API
-rw-r--r-- | lib/private/Accounts/AccountManager.php | 2 | ||||
-rw-r--r-- | lib/private/Server.php | 2 | ||||
-rw-r--r-- | lib/public/Accounts/IAccount.php | 2 |
3 files changed, 4 insertions, 2 deletions
diff --git a/lib/private/Accounts/AccountManager.php b/lib/private/Accounts/AccountManager.php index 7f177e9c658..a057cb4fc27 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 e0bd8084282..32d7705919c 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 0fa8f6e53e4..6bf4988a9f1 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 |