|
|
|
|
@ -30,6 +30,7 @@ |
|
|
|
|
namespace OCA\Files_External\AppInfo; |
|
|
|
|
|
|
|
|
|
use OCA\Files_External\Config\UserPlaceholderHandler; |
|
|
|
|
use OCA\Files_External\Service\DBConfigService; |
|
|
|
|
use OCA\Files_External\Lib\Auth\AmazonS3\AccessKey; |
|
|
|
|
use OCA\Files_External\Lib\Auth\Builtin; |
|
|
|
|
use OCA\Files_External\Lib\Auth\NullMechanism; |
|
|
|
|
@ -63,6 +64,8 @@ use OCA\Files_External\Service\BackendService; |
|
|
|
|
use OCP\AppFramework\App; |
|
|
|
|
use OCP\AppFramework\IAppContainer; |
|
|
|
|
use OCP\Files\Config\IUserMountCache; |
|
|
|
|
use OCP\IUser; |
|
|
|
|
use Symfony\Component\EventDispatcher\GenericEvent; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @package OCA\Files_External\AppInfo |
|
|
|
|
@ -96,6 +99,20 @@ class Application extends App implements IBackendProvider, IAuthMechanismProvide |
|
|
|
|
$this->getAuthMechanisms(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public function registerListeners() { |
|
|
|
|
$dispatcher = $this->getContainer()->getServer()->getEventDispatcher(); |
|
|
|
|
$dispatcher->addListener( |
|
|
|
|
IUser::class . '::postDelete', |
|
|
|
|
function (GenericEvent $event) { |
|
|
|
|
/** @var IUser $user */ |
|
|
|
|
$user = $event->getSubject(); |
|
|
|
|
/** @var DBConfigService $config */ |
|
|
|
|
$config = $this->getContainer()->query(DBConfigService::class); |
|
|
|
|
$config->modifyMountsOnUserDelete($user->getUID()); |
|
|
|
|
} |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @{inheritdoc} |
|
|
|
|
*/ |
|
|
|
|
|