We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 44c0d2d commit b38674aCopy full SHA for b38674a
src/MonologHandler.php
@@ -42,8 +42,13 @@ protected function addContext(array $context = [])
42
$data = @call_user_func($config['person_fn']);
43
if (! empty($data)) {
44
if (is_object($data)) {
45
- if (method_exists($data, 'getKey')) {
+ if (isset($data->id)) {
46
+ $person['id'] = $data->id;
47
+ } elseif (method_exists($data, 'getKey')) {
48
$person['id'] = $data->getKey();
49
+ }
50
+
51
+ if (isset($person['id'])) {
52
if (isset($data->username)) {
53
$person['username'] = $data->username;
54
}
0 commit comments