function hook_raven_user_alter in Raven: Sentry Integration 7
Same name and namespace in other branches
- 7.4 raven.api.php \hook_raven_user_alter()
- 7.2 raven.api.php \hook_raven_user_alter()
- 7.3 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 function implements hook_raven_user_alter()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- raven_raven_user_alter in ./
raven.module - Implements hook_raven_user_alter().
1 invocation of hook_raven_user_alter()
- raven_init in ./
raven.module - Implements hook_init().
File
- ./
raven.api.php, line 13 - 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);
}
}