Merge pull request #7342 from nextcloud/fix_carddav_converter

CardDAV convertor check should not be to wide
pull/6590/head
blizzz 7 years ago committed by GitHub
commit 80b27fdb93
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      apps/dav/lib/CardDAV/Converter.php

@ -61,6 +61,10 @@ class Converter {
$publish = false;
if ($image !== null && isset($userData[AccountManager::PROPERTY_AVATAR])) {
$userData[AccountManager::PROPERTY_AVATAR]['value'] = true;
}
foreach ($userData as $property => $value) {
$shareWithTrustedServers =
@ -68,9 +72,8 @@ class Converter {
$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:

Loading…
Cancel
Save