diff options
Diffstat (limited to 'apps/dav/lib/CardDAV/Converter.php')
-rw-r--r-- | apps/dav/lib/CardDAV/Converter.php | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/apps/dav/lib/CardDAV/Converter.php b/apps/dav/lib/CardDAV/Converter.php index dd7ceb77c55..8602d3b4ed9 100644 --- a/apps/dav/lib/CardDAV/Converter.php +++ b/apps/dav/lib/CardDAV/Converter.php @@ -26,6 +26,7 @@ namespace OCA\DAV\CardDAV; use OC\Accounts\AccountManager; +use OCP\Accounts\IAccountManager; use OCP\IImage; use OCP\IUser; use Sabre\VObject\Component\VCard; @@ -62,8 +63,8 @@ class Converter { $publish = false; - if ($image !== null && isset($userData[AccountManager::PROPERTY_AVATAR])) { - $userData[AccountManager::PROPERTY_AVATAR]['value'] = true; + if ($image !== null && isset($userData[IAccountManager::PROPERTY_AVATAR])) { + $userData[IAccountManager::PROPERTY_AVATAR]['value'] = true; } foreach ($userData as $property => $value) { @@ -76,28 +77,28 @@ class Converter { if ($shareWithTrustedServers && !$emptyValue) { $publish = true; switch ($property) { - case AccountManager::PROPERTY_DISPLAYNAME: + case IAccountManager::PROPERTY_DISPLAYNAME: $vCard->add(new Text($vCard, 'FN', $value['value'])); $vCard->add(new Text($vCard, 'N', $this->splitFullName($value['value']))); break; - case AccountManager::PROPERTY_AVATAR: + case IAccountManager::PROPERTY_AVATAR: if ($image !== null) { $vCard->add('PHOTO', $image->data(), ['ENCODING' => 'b', 'TYPE' => $image->mimeType()]); } break; - case AccountManager::PROPERTY_EMAIL: + case IAccountManager::PROPERTY_EMAIL: $vCard->add(new Text($vCard, 'EMAIL', $value['value'], ['TYPE' => 'OTHER'])); break; - case AccountManager::PROPERTY_WEBSITE: + case IAccountManager::PROPERTY_WEBSITE: $vCard->add(new Text($vCard, 'URL', $value['value'])); break; - case AccountManager::PROPERTY_PHONE: + case IAccountManager::PROPERTY_PHONE: $vCard->add(new Text($vCard, 'TEL', $value['value'], ['TYPE' => 'OTHER'])); break; - case AccountManager::PROPERTY_ADDRESS: + case IAccountManager::PROPERTY_ADDRESS: $vCard->add(new Text($vCard, 'ADR', $value['value'], ['TYPE' => 'OTHER'])); break; - case AccountManager::PROPERTY_TWITTER: + case IAccountManager::PROPERTY_TWITTER: $vCard->add(new Text($vCard, 'X-SOCIALPROFILE', $value['value'], ['TYPE' => 'TWITTER'])); break; } |