Skip to content

Commit 2bdb628

Browse files
authored
Merge pull request #55319 from nextcloud/fix/dav/user-addressbook-clean-up-stable29
2 parents 7ddfdc1 + d7a625b commit 2bdb628

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

apps/dav/lib/CardDAV/CardDavBackend.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1053,6 +1053,13 @@ public function updateShares(IShareable $shareable, array $add, array $remove):
10531053
}, $this->db);
10541054
}
10551055

1056+
/**
1057+
* Delete all of a user's shares
1058+
*/
1059+
public function deleteAllSharesByUser(string $principaluri): void {
1060+
$this->sharingBackend->deleteAllSharesByUser($principaluri);
1061+
}
1062+
10561063
/**
10571064
* Search contacts in a specific address-book
10581065
*

apps/dav/lib/HookManager.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ public function postDeleteUser($params) {
141141
);
142142
}
143143
$this->calDav->deleteAllSharesByUser('principals/users/' . $uid);
144+
$this->cardDav->deleteAllSharesByUser('principals/users/' . $uid);
144145

145146
foreach ($this->addressBooksToDelete as $addressBook) {
146147
$this->cardDav->deleteAddressBook($addressBook['id']);

0 commit comments

Comments
 (0)