summaryrefslogtreecommitdiffstats
path: root/apps/files_external/lib/AppInfo/Application.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_external/lib/AppInfo/Application.php')
-rw-r--r--apps/files_external/lib/AppInfo/Application.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/apps/files_external/lib/AppInfo/Application.php b/apps/files_external/lib/AppInfo/Application.php
index 2e614dd366a..9e07339e068 100644
--- a/apps/files_external/lib/AppInfo/Application.php
+++ b/apps/files_external/lib/AppInfo/Application.php
@@ -64,6 +64,7 @@ use OCA\Files_External\Lib\Backend\DAV;
use OCA\Files_External\Lib\Backend\FTP;
use OCA\Files_External\Lib\Backend\Local;
use OCP\Files\Config\IUserMountCache;
+use OCP\IGroup;
use OCP\IUser;
use Symfony\Component\EventDispatcher\GenericEvent;
@@ -111,6 +112,16 @@ class Application extends App implements IBackendProvider, IAuthMechanismProvide
$config->modifyMountsOnUserDelete($user->getUID());
}
);
+ $dispatcher->addListener(
+ IGroup::class . '::postDelete',
+ function (GenericEvent $event) {
+ /** @var IGroup $group */
+ $group = $event->getSubject();
+ /** @var DBConfigService $config */
+ $config = $this->getContainer()->query(DBConfigService::class);
+ $config->modifyMountsOnGroupDelete($group->getGID());
+ }
+ );
}
/**