function get_rollbar_user() {
if (Auth::check()) {
$user = Auth::user();
return array(
'id' => $user->id, // required - value is a string
'username' => $user->fullName(), // required - value is a string
'email' => $user->email, // optional - value is a string
);
}
return null;
}
You can now assign and use person_fn from config file and use any user-defined helper function to pass person data to rollbar object.