Add default values when parsing account data
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
parent
f5286bcb07
commit
0f911e2d13
|
@ -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…
Reference in New Issue