Merge pull request #7456 from nextcloud/12_7342

[stable12] CardDAV convertor check should not be to wide
This commit is contained in:
Morris Jobke 2017-12-12 10:04:40 +01:00 committed by GitHub
commit f44d5bde56
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 2 deletions

View File

@ -60,6 +60,10 @@ class Converter {
$publish = false; $publish = false;
if ($image !== null && isset($userData[AccountManager::PROPERTY_AVATAR])) {
$userData[AccountManager::PROPERTY_AVATAR]['value'] = true;
}
foreach ($userData as $property => $value) { foreach ($userData as $property => $value) {
$shareWithTrustedServers = $shareWithTrustedServers =
@ -67,9 +71,8 @@ class Converter {
$value['scope'] === AccountManager::VISIBILITY_PUBLIC; $value['scope'] === AccountManager::VISIBILITY_PUBLIC;
$emptyValue = !isset($value['value']) || $value['value'] === ''; $emptyValue = !isset($value['value']) || $value['value'] === '';
$noImage = $image === null;
if ($shareWithTrustedServers && (!$emptyValue || !$noImage)) { if ($shareWithTrustedServers && !$emptyValue) {
$publish = true; $publish = true;
switch ($property) { switch ($property) {
case AccountManager::PROPERTY_DISPLAYNAME: case AccountManager::PROPERTY_DISPLAYNAME: