summaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/CardDAV/Converter.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/dav/lib/CardDAV/Converter.php')
-rw-r--r--apps/dav/lib/CardDAV/Converter.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/apps/dav/lib/CardDAV/Converter.php b/apps/dav/lib/CardDAV/Converter.php
index 0f4a6fb3f08..d1fb754017e 100644
--- a/apps/dav/lib/CardDAV/Converter.php
+++ b/apps/dav/lib/CardDAV/Converter.php
@@ -43,16 +43,17 @@ class Converter {
$image = $this->getAvatarImage($user);
$vCard = new VCard();
- $vCard->add(new Text($vCard, 'UID', $uid));
+ $vCard->VERSION = '3.0';
+ $vCard->UID = $uid;
if (!empty($displayName)) {
- $vCard->add(new Text($vCard, 'FN', $displayName));
- $vCard->add(new Text($vCard, 'N', $this->splitFullName($displayName)));
+ $vCard->FN = $displayName;
+ $vCard->N = $this->splitFullName($displayName);
}
if (!empty($emailAddress)) {
$vCard->add(new Text($vCard, 'EMAIL', $emailAddress, ['TYPE' => 'OTHER']));
}
if (!empty($cloudId)) {
- $vCard->add(new Text($vCard, 'CLOUD', $cloudId));
+ $vCard->CLOUD = $cloudId;
}
if ($image) {
$vCard->add('PHOTO', $image->data(), ['ENCODING' => 'b', 'TYPE' => $image->mimeType()]);