Merge pull request #12013 from nextcloud/bugfix/noid/accountmanager

Fix small issues with IAccountManager API
This commit is contained in:
Roeland Jago Douma 2018-10-24 13:49:00 +02:00 committed by GitHub
commit 5cdc85cf66
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 2 deletions

View File

@ -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;
}

View File

@ -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();

View File

@ -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