my( $self, $client, $user_session, $user_id ) = @_;
my $user_obj = $apputils->check_user_session( $user_session );
+ if(!defined($user_id)) { $user_id = $user_obj->id; }
+
if( $user_obj->id ne $user_id ) {
if($apputils->check_user_perms($user_obj->id, $user_obj->home_ou, "VIEW_USER")) {
return OpenILS::Perm->new("VIEW_USER");
# password is correct... do they have permission to login here?
my $timeout = 28800; #staff login timeout - different for opac?
+ my $opactimeout = 604800; # 14 days
if($type eq "opac") {
# 1 is the top level org unit (we should probably load the tree and get id from it)
my($session, $barcode) = @_;
warn "Searching for copy with barcode $barcode\n";
my $copy_req = $session->request(
- "open-ils.storage.fleshed.asset.copy.search.barcode",
- $barcode );
+ "open-ils.storage.fleshed.asset.copy.search.barcode", $barcode );
return $copy_req->gather(1);
}
# flesh me
- $copy = _grab_copy_by_barcode($session, $copy->barcode);
+ $copy = _grab_copy_by_barcode($session, $copy->barcode) unless ref($copy->circ_lib);
my $hold_objects = {};
$hold_objects->{standings} = $patron_standings;
$hold_objects->{copy} = $copy;
$hold_objects->{hold} = $hold;
$hold_objects->{title} = $$args{title} || _grab_title_by_copy($session, $copy->id);
- $hold_objects->{requestor} = _grab_user($session, $hold->requestor);
- my $patron = _grab_user($session, $hold->usr);
+ $hold_objects->{requestor} = $$args{requestor} || _grab_user($session, $hold->requestor);
+ my $patron = $$args{usr} || _grab_user($session, $hold->usr);
$copy->status( $copy->status->name );
$patron->standing($patron_standings->{$patron->standing()});