From 0d4f6a334f582b7ed452cd6a5bea191852e4fa6a Mon Sep 17 00:00:00 2001 From: tabuna Date: Sat, 11 May 2024 03:37:40 +0300 Subject: [PATCH] Run listener only enabled auth --- src/Platform/Providers/FoundationServiceProvider.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Platform/Providers/FoundationServiceProvider.php b/src/Platform/Providers/FoundationServiceProvider.php index 5f9e65767..1a429e7a4 100644 --- a/src/Platform/Providers/FoundationServiceProvider.php +++ b/src/Platform/Providers/FoundationServiceProvider.php @@ -97,7 +97,11 @@ public function registerOctaneEventsListen(): self */ public function registerLoginEventsListen():self { - Event::listen(Login::class, LockUserForLogin::class,); + if (config('platform.auth', true)) { + Event::listen(Login::class, LockUserForLogin::class); + } + + return $this; } /**