aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFerdinand Thiessen <opensource@fthiessen.de>2025-03-13 21:51:19 +0100
committerGitHub <noreply@github.com>2025-03-13 21:51:19 +0100
commitb2f2bf7cd704e4fc9453cc7c484a99e51653a37f (patch)
treeff2f2fd55c5b1b905969467ee91d2ad3112e1516
parent04ae68a8f72da18c1731f7c83e059304232c4e38 (diff)
parent47e7be5af88b395b0788f4a0da6f49a536dbb438 (diff)
downloadnextcloud-server-b2f2bf7cd704e4fc9453cc7c484a99e51653a37f.tar.gz
nextcloud-server-b2f2bf7cd704e4fc9453cc7c484a99e51653a37f.zip
Merge pull request #51311 from nextcloud/backport/51310/stable31
[stable31] fix(encryption): Listen for user login and logout to set encryption key
-rw-r--r--apps/encryption/lib/AppInfo/Application.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/encryption/lib/AppInfo/Application.php b/apps/encryption/lib/AppInfo/Application.php
index 600bc300797..f2ffa34535e 100644
--- a/apps/encryption/lib/AppInfo/Application.php
+++ b/apps/encryption/lib/AppInfo/Application.php
@@ -31,6 +31,8 @@ use OCP\User\Events\BeforePasswordUpdatedEvent;
use OCP\User\Events\PasswordUpdatedEvent;
use OCP\User\Events\UserCreatedEvent;
use OCP\User\Events\UserDeletedEvent;
+use OCP\User\Events\UserLoggedInEvent;
+use OCP\User\Events\UserLoggedOutEvent;
use Psr\Log\LoggerInterface;
class Application extends App implements IBootstrap {
@@ -87,6 +89,8 @@ class Application extends App implements IBootstrap {
$eventDispatcher->addServiceListener(PasswordUpdatedEvent::class, UserEventsListener::class);
$eventDispatcher->addServiceListener(BeforePasswordResetEvent::class, UserEventsListener::class);
$eventDispatcher->addServiceListener(PasswordResetEvent::class, UserEventsListener::class);
+ $eventDispatcher->addServiceListener(UserLoggedInEvent::class, UserEventsListener::class);
+ $eventDispatcher->addServiceListener(UserLoggedOutEvent::class, UserEventsListener::class);
}
public function registerEncryptionModule(IManager $encryptionManager) {