diff --git a/app/Listeners/Auth/AuthenticationListener.php b/app/Listeners/Auth/AuthenticationListener.php index 01a8e35c0..b06428bd2 100644 --- a/app/Listeners/Auth/AuthenticationListener.php +++ b/app/Listeners/Auth/AuthenticationListener.php @@ -5,7 +5,6 @@ namespace App\Listeners\Auth; use App\Facades\Activity; use Illuminate\Auth\Events\Failed; use App\Events\Auth\DirectLogin; -use Illuminate\Events\Dispatcher; class AuthenticationListener { @@ -28,10 +27,4 @@ class AuthenticationListener $activity->event($event instanceof Failed ? 'auth:fail' : 'auth:success')->log(); } - - public function subscribe(Dispatcher $events): void - { - $events->listen(Failed::class, self::class); - $events->listen(DirectLogin::class, self::class); - } } diff --git a/app/Providers/EventServiceProvider.php b/app/Providers/EventServiceProvider.php index 88b8a3d01..e8b9a9a0d 100644 --- a/app/Providers/EventServiceProvider.php +++ b/app/Providers/EventServiceProvider.php @@ -10,7 +10,6 @@ use App\Observers\UserObserver; use App\Observers\ServerObserver; use App\Observers\SubuserObserver; use App\Observers\EggVariableObserver; -use App\Listeners\Auth\AuthenticationListener; use App\Events\Server\Installed as ServerInstalledEvent; use App\Notifications\ServerInstalled as ServerInstalledNotification; use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider; @@ -24,10 +23,6 @@ class EventServiceProvider extends ServiceProvider ServerInstalledEvent::class => [ServerInstalledNotification::class], ]; - protected $subscribe = [ - AuthenticationListener::class, - ]; - /** * Register any events for your application. */ diff --git a/app/Transformers/Api/Client/ActivityLogTransformer.php b/app/Transformers/Api/Client/ActivityLogTransformer.php index af666beb6..488ad1c95 100644 --- a/app/Transformers/Api/Client/ActivityLogTransformer.php +++ b/app/Transformers/Api/Client/ActivityLogTransformer.php @@ -55,7 +55,7 @@ class ActivityLogTransformer extends BaseClientTransformer $properties = $model->properties ->mapWithKeys(function ($value, $key) use ($model) { - if ($key === 'ip' && !$model->actor->is($this->request->user())) { + if ($key === 'ip' && $model->actor instanceof User && !$model->actor->is($this->request->user())) { return [$key => '[hidden]']; } diff --git a/bootstrap/providers.php b/bootstrap/providers.php index 8c37bb7b5..a20d8785c 100644 --- a/bootstrap/providers.php +++ b/bootstrap/providers.php @@ -8,6 +8,5 @@ return [ App\Providers\Filament\AdminPanelProvider::class, App\Providers\RouteServiceProvider::class, App\Providers\ViewComposerServiceProvider::class, - SocialiteProviders\Manager\ServiceProvider::class, ];