Merge pull request #13252 from nextcloud/backport/13240/stable15

[stable15] Add default values when parsing account data
This commit is contained in:
Morris Jobke 2019-01-02 16:28:02 +01:00 committed by GitHub
commit f81fdd4b5c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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'] ?? self::VISIBILITY_PRIVATE, $accountData['verified'] ?? self::NOT_VERIFIED);
}
return $account;
}