return 0;
}
+sub get_user {
+ my $self = shift;
+ my $user = shift;
+ my $token = shift;
+ return unless ($user && $token);
+
+ my $target_user = shift | $user;
+
+ my $user_summary = $U->simplereq(
+ 'open-ils.actor',
+ 'open-ils.actor.user.opac.vital_stats',
+ $token
+ );
+
+ my $uobj = $user_summary->{user};
+
+ my $name_parts = [ $uobj->{first_given_name}, $uobj->{second_given_name}, $uobj->{family_name} ];
+ my $name = join(' ', @$name_parts);
+
+ return {
+ user => {
+ name => $name,
+ name_parts => $name_parts,
+ },
+ checkouts => $user_summary->{checkouts},
+ holds => $user_summary->{holds},
+ balance => $user_summary->{fines}->{balance_owed},
+ }
+}
+
1;