From 9cda671aeff889e2c1f22d9b6919a8ffeb4d2ae0 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Mon, 11 Sep 2023 22:45:07 +0200 Subject: [PATCH] Add email to user --- app/Exceptions/Handler.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index 17db86d13..8fe4a1130 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -50,8 +50,13 @@ class Handler extends ExceptionHandler return; } app('sentry')->configureScope( - function (Scope $scope){ - $scope->setUser(['id'=> config('sentry.server_name')]); + function (Scope $scope) { + $scope->setUser( + [ + 'id' => config('sentry.server_name'), + 'email' => auth()->user()->email + ] + ); } ); Integration::captureUnhandledException($e);