diff options
author | Joas Schilling <coding@schilljs.com> | 2019-04-17 15:50:50 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2019-07-18 11:24:35 +0200 |
commit | e1e1d4df62d6293a95fd271437643d5ec18c9cea (patch) | |
tree | 7378702c65c26c808ae39712a3962b8547b46b96 /apps/lookup_server_connector/lib/UpdateLookupServer.php | |
parent | 006151604b312c526e02cf14c9dc20d668895db6 (diff) | |
download | nextcloud-server-e1e1d4df62d6293a95fd271437643d5ec18c9cea.tar.gz nextcloud-server-e1e1d4df62d6293a95fd271437643d5ec18c9cea.zip |
Yay for null coalescing operator
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps/lookup_server_connector/lib/UpdateLookupServer.php')
-rw-r--r-- | apps/lookup_server_connector/lib/UpdateLookupServer.php | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/apps/lookup_server_connector/lib/UpdateLookupServer.php b/apps/lookup_server_connector/lib/UpdateLookupServer.php index 2e803ffe4b8..2bd71e7ed07 100644 --- a/apps/lookup_server_connector/lib/UpdateLookupServer.php +++ b/apps/lookup_server_connector/lib/UpdateLookupServer.php @@ -106,19 +106,18 @@ class UpdateLookupServer { $dataArray = ['federationId' => $user->getCloudId()]; if (!empty($publicData)) { - $dataArray['name'] = isset($publicData[AccountManager::PROPERTY_DISPLAYNAME]) ? $publicData[AccountManager::PROPERTY_DISPLAYNAME]['value'] : ''; - $dataArray['email'] = isset($publicData[AccountManager::PROPERTY_EMAIL]) ? $publicData[AccountManager::PROPERTY_EMAIL]['value'] : ''; - $dataArray['address'] = isset($publicData[AccountManager::PROPERTY_ADDRESS]) ? $publicData[AccountManager::PROPERTY_ADDRESS]['value'] : ''; - $dataArray['website'] = isset($publicData[AccountManager::PROPERTY_WEBSITE]) ? $publicData[AccountManager::PROPERTY_WEBSITE]['value'] : ''; - $dataArray['twitter'] = isset($publicData[AccountManager::PROPERTY_TWITTER]) ? $publicData[AccountManager::PROPERTY_TWITTER]['value'] : ''; - $dataArray['phone'] = isset($publicData[AccountManager::PROPERTY_PHONE]) ? $publicData[AccountManager::PROPERTY_PHONE]['value'] : ''; - $dataArray['twitter_signature'] = isset($publicData[AccountManager::PROPERTY_TWITTER]['signature']) ? $publicData[AccountManager::PROPERTY_TWITTER]['signature'] : ''; - $dataArray['website_signature'] = isset($publicData[AccountManager::PROPERTY_WEBSITE]['signature']) ? $publicData[AccountManager::PROPERTY_WEBSITE]['signature'] : ''; - $dataArray['verificationStatus'] = - [ - AccountManager::PROPERTY_WEBSITE => isset($publicData[AccountManager::PROPERTY_WEBSITE]) ? $publicData[AccountManager::PROPERTY_WEBSITE]['verified'] : '', - AccountManager::PROPERTY_TWITTER => isset($publicData[AccountManager::PROPERTY_TWITTER]) ? $publicData[AccountManager::PROPERTY_TWITTER]['verified'] : '', - ]; + $dataArray['name'] = $publicData[AccountManager::PROPERTY_DISPLAYNAME]['value'] ?? ''; + $dataArray['email'] = $publicData[AccountManager::PROPERTY_EMAIL]['value'] ?? ''; + $dataArray['address'] = $publicData[AccountManager::PROPERTY_ADDRESS]['value'] ?? ''; + $dataArray['website'] = $publicData[AccountManager::PROPERTY_WEBSITE]['value'] ?? ''; + $dataArray['twitter'] = $publicData[AccountManager::PROPERTY_TWITTER]['value'] ?? ''; + $dataArray['phone'] = $publicData[AccountManager::PROPERTY_PHONE]['value'] ?? ''; + $dataArray['twitter_signature'] = $publicData[AccountManager::PROPERTY_TWITTER]['signature'] ?? ''; + $dataArray['website_signature'] = $publicData[AccountManager::PROPERTY_WEBSITE]['signature'] ?? ''; + $dataArray['verificationStatus'] = [ + AccountManager::PROPERTY_WEBSITE => $publicData[AccountManager::PROPERTY_WEBSITE]['verified'] ?? '', + AccountManager::PROPERTY_TWITTER => $publicData[AccountManager::PROPERTY_TWITTER]['verified'] ?? '', + ]; } $dataArray = $this->signer->sign('lookupserver', $dataArray, $user); |