diff --git a/apps/dav/lib/CardDAV/Converter.php b/apps/dav/lib/CardDAV/Converter.php index 9e106a0fe28cf..fb2813fb22c3b 100644 --- a/apps/dav/lib/CardDAV/Converter.php +++ b/apps/dav/lib/CardDAV/Converter.php @@ -60,6 +60,10 @@ public function createCardFromUser(IUser $user) { $publish = false; + if ($image !== null && isset($userData[AccountManager::PROPERTY_AVATAR])) { + $userData[AccountManager::PROPERTY_AVATAR]['value'] = true; + } + foreach ($userData as $property => $value) { $shareWithTrustedServers = @@ -67,9 +71,8 @@ public function createCardFromUser(IUser $user) { $value['scope'] === AccountManager::VISIBILITY_PUBLIC; $emptyValue = !isset($value['value']) || $value['value'] === ''; - $noImage = $image === null; - if ($shareWithTrustedServers && (!$emptyValue || !$noImage)) { + if ($shareWithTrustedServers && !$emptyValue) { $publish = true; switch ($property) { case AccountManager::PROPERTY_DISPLAYNAME: