mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Fixes for Sentry (#3581)
This commit is contained in:
parent
aefa6749af
commit
d392ba821e
@ -60,10 +60,17 @@ class Handler extends ExceptionHandler
|
||||
|
||||
app('sentry')->configureScope(function (Scope $scope): void {
|
||||
|
||||
if (auth()->user() && auth()->user()->account->report_errors) {
|
||||
if(auth()->guard('contact')->user() && auth()->guard('contact')->user()->account->report_errors) {
|
||||
$scope->setUser([
|
||||
'id' => auth()->guard('contact')->user()->account->key,
|
||||
'email' => "anonymous@example.com",
|
||||
'name' => "Anonymous User",
|
||||
]);
|
||||
}
|
||||
else if (auth()->user() && auth()->user()->account->report_errors) {
|
||||
$scope->setUser([
|
||||
'id' => auth()->user()->account->key,
|
||||
'email' => auth()->user()->email,
|
||||
'email' => "anonymous@example.com",
|
||||
'name' => "Anonymous User",
|
||||
]);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user