diff options
author | Joas Schilling <213943+nickvergessen@users.noreply.github.com> | 2023-01-13 09:08:35 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-13 09:08:35 +0100 |
commit | 97e83c31b456e628e97d2b3e8d586c1222cd497f (patch) | |
tree | 5bb3ce9beb6a7ecbc4b95db65eb98b4ee71726c0 /apps | |
parent | 62476a369191d6e13ea723feb71fbb788b819885 (diff) | |
parent | e6f470592066efa371e6e8d02dbfb063daef9844 (diff) | |
download | nextcloud-server-97e83c31b456e628e97d2b3e8d586c1222cd497f.tar.gz nextcloud-server-97e83c31b456e628e97d2b3e8d586c1222cd497f.zip |
Merge pull request #36131 from nextcloud/revert/32057
Revert "Fix sync errors for card creation with the same uri from different sources"
Diffstat (limited to 'apps')
-rw-r--r-- | apps/dav/lib/CardDAV/Converter.php | 4 | ||||
-rw-r--r-- | apps/dav/lib/CardDAV/SyncService.php | 2 |
2 files changed, 2 insertions, 4 deletions
diff --git a/apps/dav/lib/CardDAV/Converter.php b/apps/dav/lib/CardDAV/Converter.php index 8452810c29e..340e3127f0a 100644 --- a/apps/dav/lib/CardDAV/Converter.php +++ b/apps/dav/lib/CardDAV/Converter.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; diff --git a/apps/dav/lib/CardDAV/SyncService.php b/apps/dav/lib/CardDAV/SyncService.php index d73ec9029f9..da798c5768e 100644 --- a/apps/dav/lib/CardDAV/SyncService.php +++ b/apps/dav/lib/CardDAV/SyncService.php @@ -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']); |