Skip to content

Commit

Permalink
fixed publishing of user properties to lookup-server
Browse files Browse the repository at this point in the history
Fix of the bug in the lookup_server_connector module to publish public user information to the lookup-server.
As described in issue [#25290](#25290)

Signed-off-by: AbangTor <[email protected]>
  • Loading branch information
abangtor committed Jan 24, 2021
1 parent 48854f2 commit 1344322
Showing 1 changed file with 18 additions and 12 deletions.
30 changes: 18 additions & 12 deletions apps/lookup_server_connector/lib/BackgroundJobs/RetryJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -200,18 +200,24 @@ protected function getUserAccountData(IUser $user): array {

$data = ['federationId' => $user->getCloudId()];
if (!empty($publicData)) {
$data['name'] = $publicData[IAccountManager::PROPERTY_DISPLAYNAME]['value'] ?? '';
$data['email'] = $publicData[IAccountManager::PROPERTY_EMAIL]['value'] ?? '';
$data['address'] = $publicData[IAccountManager::PROPERTY_ADDRESS]['value'] ?? '';
$data['website'] = $publicData[IAccountManager::PROPERTY_WEBSITE]['value'] ?? '';
$data['twitter'] = $publicData[IAccountManager::PROPERTY_TWITTER]['value'] ?? '';
$data['phone'] = $publicData[IAccountManager::PROPERTY_PHONE]['value'] ?? '';
$data['twitter_signature'] = $publicData[IAccountManager::PROPERTY_TWITTER]['signature'] ?? '';
$data['website_signature'] = $publicData[IAccountManager::PROPERTY_WEBSITE]['signature'] ?? '';
$data['verificationStatus'] = [
IAccountManager::PROPERTY_WEBSITE => $publicData[IAccountManager::PROPERTY_WEBSITE]['verified'] ?? '',
IAccountManager::PROPERTY_TWITTER => $publicData[IAccountManager::PROPERTY_TWITTER]['verified'] ?? '',
];
$data['name'] = $publicData[IAccountManager::PROPERTY_DISPLAYNAME] ?? '';
$data['email'] = $publicData[IAccountManager::PROPERTY_EMAIL] ?? '';
$data['address'] = $publicData[IAccountManager::PROPERTY_ADDRESS] ?? '';
$data['website'] = $publicData[IAccountManager::PROPERTY_WEBSITE] ?? '';
$data['twitter'] = $publicData[IAccountManager::PROPERTY_TWITTER] ?? '';
$data['phone'] = $publicData[IAccountManager::PROPERTY_PHONE] ?? '';

/**
/* @todo Signature and verification status are currently removed,
/* since those information are not provided by the Account
/* or AccountProperties class.
*/
//$data['twitter_signature'] = $publicData[IAccountManager::PROPERTY_TWITTER]['signature'] ?? '';
//$data['website_signature'] = $publicData[IAccountManager::PROPERTY_WEBSITE]['signature'] ?? '';
//$data['verificationStatus'] = [
// IAccountManager::PROPERTY_WEBSITE => $publicData[IAccountManager::PROPERTY_WEBSITE]['verified'] ?? '',
// IAccountManager::PROPERTY_TWITTER => $publicData[IAccountManager::PROPERTY_TWITTER]['verified'] ?? '',
//];
}

return $data;
Expand Down

0 comments on commit 1344322

Please sign in to comment.