function hook_raven_user_alter in Raven: Sentry Integration 7.3
Same name and namespace in other branches
- 7.4 raven.api.php \hook_raven_user_alter()
- 7 raven.api.php \hook_raven_user_alter()
- 7.2 raven.api.php \hook_raven_user_alter()
Provide user information for logging.
Parameters
array $user_info: A reference to array of user account info.
1 invocation of hook_raven_user_alter()
- raven_init in ./
raven.module - Implements hook_init().
File
- ./
raven.api.php, line 14 - Sample hooks demonstrating usage of Raven.
Code
function hook_raven_user_alter(array &$user_info) {
global $user;
if (user_is_logged_in()) {
$user_info['id'] = $user->uid;
$user_info['name'] = $user->name;
$user_info['email'] = $user->mail;
$user_info['roles'] = implode(', ', $user->roles);
}
}