mirror of
https://github.com/nextcloud/server.git
synced 2026-06-09 00:32:29 -04:00
fix: delete UserStatusAutomation when user is deleted
Signed-off-by: Salvatore Martire <4652631+salmart-dev@users.noreply.github.com>
This commit is contained in:
parent
e4183236ed
commit
125696bfbc
1 changed files with 5 additions and 0 deletions
|
|
@ -9,12 +9,14 @@ declare(strict_types=1);
|
|||
|
||||
namespace OCA\DAV\Listener;
|
||||
|
||||
use OCA\DAV\BackgroundJob\UserStatusAutomation;
|
||||
use OCA\DAV\CalDAV\CalDavBackend;
|
||||
use OCA\DAV\CardDAV\CardDavBackend;
|
||||
use OCA\DAV\CardDAV\SyncService;
|
||||
use OCA\DAV\Service\ExampleContactService;
|
||||
use OCA\DAV\Service\ExampleEventService;
|
||||
use OCP\Accounts\UserUpdatedEvent;
|
||||
use OCP\BackgroundJob\IJobList;
|
||||
use OCP\Defaults;
|
||||
use OCP\EventDispatcher\Event;
|
||||
use OCP\EventDispatcher\IEventListener;
|
||||
|
|
@ -49,6 +51,7 @@ class UserEventsListener implements IEventListener {
|
|||
private ExampleContactService $exampleContactService,
|
||||
private ExampleEventService $exampleEventService,
|
||||
private LoggerInterface $logger,
|
||||
private IJobList $jobList,
|
||||
) {
|
||||
}
|
||||
|
||||
|
|
@ -124,6 +127,8 @@ class UserEventsListener implements IEventListener {
|
|||
$this->cardDav->deleteAddressBook($addressBook['id']);
|
||||
}
|
||||
|
||||
$this->jobList->remove(UserStatusAutomation::class, ['userId' => $uid]);
|
||||
|
||||
unset($this->calendarsToDelete[$uid]);
|
||||
unset($this->subscriptionsToDelete[$uid]);
|
||||
unset($this->addressBooksToDelete[$uid]);
|
||||
|
|
|
|||
Loading…
Reference in a new issue