Пример #1
0
 /**
  * {@inheritdoc}
  */
 protected function get_user_data()
 {
     $user = [];
     if (isset($this->context) && $this->context->user) {
         $user = $this->context->user;
     }
     if (!is_null($this->session)) {
         $session = $this->session->all();
         // Add Laravel session data
         if (isset($user['data'])) {
             $user['data'] = array_merge($session, $user['data']);
         } else {
             $user['data'] = $session;
         }
         // Add session id
         if (!isset($user['id'])) {
             $user['id'] = $this->session->getId();
         }
     }
     return ['sentry.interfaces.User' => $user];
 }