mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
fix(dav): clean up user's addressbook shares on deletion
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
This commit is contained in:
parent
731181e40d
commit
5f05dd79ec
2 changed files with 8 additions and 0 deletions
|
|
@ -1091,6 +1091,13 @@ class CardDavBackend implements BackendInterface, SyncSupport {
|
|||
}, $this->db);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete all of a user's shares
|
||||
*/
|
||||
public function deleteAllSharesByUser(string $principaluri): void {
|
||||
$this->sharingBackend->deleteAllSharesByUser($principaluri);
|
||||
}
|
||||
|
||||
/**
|
||||
* Search contacts in a specific address-book
|
||||
*
|
||||
|
|
|
|||
|
|
@ -102,6 +102,7 @@ class HookManager {
|
|||
);
|
||||
}
|
||||
$this->calDav->deleteAllSharesByUser('principals/users/' . $uid);
|
||||
$this->cardDav->deleteAllSharesByUser('principals/users/' . $uid);
|
||||
|
||||
foreach ($this->addressBooksToDelete as $addressBook) {
|
||||
$this->cardDav->deleteAddressBook($addressBook['id']);
|
||||
|
|
|
|||
Loading…
Reference in a new issue