Merge pull request #13240 from nextcloud/bugfix/noid/accountmanager-defaults

Add default values when parsing account data
pull/13086/head
Roeland Jago Douma 7 years ago committed by GitHub
commit 39131eee3e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      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'] ?? self::VISIBILITY_PRIVATE, $accountData['verified'] ?? self::NOT_VERIFIED);
}
return $account;
}

Loading…
Cancel
Save