mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Revert "Fix sync errors for duplicate cards with the same UID for different backends"
This reverts commit ddcee3dbab.
Signed-off-by: Christopher Ng <chrng8@gmail.com>
This commit is contained in:
parent
bec52be8ed
commit
e6f4705920
2 changed files with 2 additions and 4 deletions
|
|
@ -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']);
|
||||
|
|
|
|||
Loading…
Reference in a new issue