added bypass for user checks - good for item checkin where it does not matter
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 31 Aug 2006 00:04:10 +0000 (00:04 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 31 Aug 2006 00:04:10 +0000 (00:04 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@5797 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/Circ/ScriptBuilder.pm

index ac3ef98..585d931 100644 (file)
@@ -175,19 +175,21 @@ sub fetch_user_data {
 
        return undef unless my $patron = $ctx->{patron};
 
-       return OpenILS::Event->new('PATRON_INACTIVE')
-               unless $U->is_true($patron->active);
-
-       $patron->card($e->retrieve_actor_card($patron->card));
-
-       return OpenILS::Event->new('PATRON_CARD_INACTIVE')
-               unless $U->is_true($patron->card->active);
-
-       my $expire = DateTime::Format::ISO8601->new->parse_datetime(
-               clense_ISO8601($patron->expire_date));
-
-       return OpenILS::Event->new('PATRON_ACCOUNT_EXPIRED')
-               if( CORE::time > $expire->epoch ) ;
+       unless( $ctx->{ignore_user_status} ) {
+               return OpenILS::Event->new('PATRON_INACTIVE')
+                       unless $U->is_true($patron->active);
+       
+               $patron->card($e->retrieve_actor_card($patron->card));
+       
+               return OpenILS::Event->new('PATRON_CARD_INACTIVE')
+                       unless $U->is_true($patron->card->active);
+       
+               my $expire = DateTime::Format::ISO8601->new->parse_datetime(
+                       clense_ISO8601($patron->expire_date));
+       
+               return OpenILS::Event->new('PATRON_ACCOUNT_EXPIRED')
+                       if( CORE::time > $expire->epoch ) ;
+       }
 
        $patron->home_ou( 
                $e->retrieve_actor_org_unit($patron->home_ou) )