You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tyler - this is a great service. Thanks for putting it together.
One issue I had was recording an exception for a user with a custom guard. The value for user_id was null. A workaround I came up with is to edit the getUserId function within the Components/Recorder.php file:
`protected function getUserId() {
$user = Auth::user();
if (!isset($user)) {
$user = Auth::guard('manager')->user();
} if (!isset($user)) {
$user = Auth::guard('admin')->user();
}
if (is_object($user) && !empty($user->id)) {
return $user->id;
} else {
return null;
}
}`
Thought I would post for anyone who comes across this problem later on.
Maybe a future release could include an array in the config/lern.php where the user could enter a list of guards to check for a logged in user?
Thanks again
The text was updated successfully, but these errors were encountered:
Tyler - this is a great service. Thanks for putting it together.
One issue I had was recording an exception for a user with a custom guard. The value for user_id was null. A workaround I came up with is to edit the getUserId function within the Components/Recorder.php file:
`protected function getUserId() {
}`
Thought I would post for anyone who comes across this problem later on.
Maybe a future release could include an array in the config/lern.php where the user could enter a list of guards to check for a logged in user?
Thanks again
The text was updated successfully, but these errors were encountered: