Browse Source
Merge pull request #36131 from nextcloud/revert/32057
Revert "Fix sync errors for card creation with the same uri from different sources"
pull/36113/head
Joas Schilling
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
2 additions and
4 deletions
-
apps/dav/lib/CardDAV/Converter.php
-
apps/dav/lib/CardDAV/SyncService.php
|
|
|
@ -47,14 +47,12 @@ class Converter { |
|
|
|
$userProperties = $this->accountManager->getAccount($user)->getProperties(); |
|
|
|
|
|
|
|
$uid = $user->getUID(); |
|
|
|
$backendClassName = $user->getBackendClassName(); |
|
|
|
$cloudId = $user->getCloudId(); |
|
|
|
$image = $this->getAvatarImage($user); |
|
|
|
|
|
|
|
$vCard = new VCard(); |
|
|
|
$vCard->VERSION = '3.0'; |
|
|
|
$vCard->UID = md5("$backendClassName:$uid"); |
|
|
|
$vCard->add(new Text($vCard, 'X-NEXTCLOUD-UID', $uid)); |
|
|
|
$vCard->UID = $uid; |
|
|
|
|
|
|
|
$publish = false; |
|
|
|
|
|
|
|
|
|
|
|
@ -274,7 +274,7 @@ class SyncService { |
|
|
|
$allCards = $this->backend->getCards($systemAddressBook['id']); |
|
|
|
foreach ($allCards as $card) { |
|
|
|
$vCard = Reader::read($card['carddata']); |
|
|
|
$uid = isset($vCard->{'X-NEXTCLOUD-UID'}) ? $vCard->{'X-NEXTCLOUD-UID'}->getValue() : $vCard->UID->getValue(); |
|
|
|
$uid = $vCard->UID->getValue(); |
|
|
|
// load backend and see if user exists
|
|
|
|
if (!$this->userManager->userExists($uid)) { |
|
|
|
$this->deleteUser($card['uri']); |
|
|
|
|