You are here

function raven_raven_user_alter in Raven: Sentry Integration 7

Implements hook_raven_user_alter().

File

./raven.module, line 421
Allows to track errors to Sentry server.

Code

function raven_raven_user_alter(array &$variables) {
  global $user;
  $variables['ip_address'] = ip_address();
  if (user_is_logged_in()) {
    $variables['id'] = $user->uid;
    $variables['name'] = $user->name;
    $variables['email'] = $user->mail;
    $variables['roles'] = implode(', ', $user->roles);
  }
}