Skip to content

Commit f44d5bd

Browse files
authored
Merge pull request #7456 from nextcloud/12_7342
[stable12] CardDAV convertor check should not be to wide
2 parents 4b60ada + dfed58e commit f44d5bd

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

apps/dav/lib/CardDAV/Converter.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,16 +60,19 @@ public function createCardFromUser(IUser $user) {
6060

6161
$publish = false;
6262

63+
if ($image !== null && isset($userData[AccountManager::PROPERTY_AVATAR])) {
64+
$userData[AccountManager::PROPERTY_AVATAR]['value'] = true;
65+
}
66+
6367
foreach ($userData as $property => $value) {
6468

6569
$shareWithTrustedServers =
6670
$value['scope'] === AccountManager::VISIBILITY_CONTACTS_ONLY ||
6771
$value['scope'] === AccountManager::VISIBILITY_PUBLIC;
6872

6973
$emptyValue = !isset($value['value']) || $value['value'] === '';
70-
$noImage = $image === null;
7174

72-
if ($shareWithTrustedServers && (!$emptyValue || !$noImage)) {
75+
if ($shareWithTrustedServers && !$emptyValue) {
7376
$publish = true;
7477
switch ($property) {
7578
case AccountManager::PROPERTY_DISPLAYNAME:

0 commit comments

Comments
 (0)