mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 21:22:58 +01: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 {
|
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([
|
$scope->setUser([
|
||||||
'id' => auth()->user()->account->key,
|
'id' => auth()->user()->account->key,
|
||||||
'email' => auth()->user()->email,
|
'email' => "anonymous@example.com",
|
||||||
'name' => "Anonymous User",
|
'name' => "Anonymous User",
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user