From 1ced0dcd1e308a96b2016c4d17fb906c0e9e52ed Mon Sep 17 00:00:00 2001 From: the-djmaze <> Date: Fri, 4 Nov 2022 09:27:22 +0100 Subject: [PATCH] Nextcloud Impersonate idea https://github.com/nextcloud/impersonate/issues/179 --- .../nextcloud/snappymail/lib/AppInfo/Application.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/integrations/nextcloud/snappymail/lib/AppInfo/Application.php b/integrations/nextcloud/snappymail/lib/AppInfo/Application.php index 466286ef0..a7ca9430b 100644 --- a/integrations/nextcloud/snappymail/lib/AppInfo/Application.php +++ b/integrations/nextcloud/snappymail/lib/AppInfo/Application.php @@ -99,5 +99,14 @@ class Application extends App implements IBootstrap SnappyMailHelper::loadApp(); \RainLoop\Api::Actions()->Logout(true); }); + +/* + // https://github.com/nextcloud/impersonate/issues/179 + $userSession->listen('\OC\User', 'impersonate', function($user, $newUser) { + \OC::$server->getSession()['snappymail-password'] = ''; + SnappyMailHelper::loadApp(); + \RainLoop\Api::Actions()->Logout(true); + }); +*/ } }