[open-ils-commits] r16570 - trunk/Open-ILS/src/perlmods/OpenILS/Application (dbs)

svn at svn.open-ils.org svn at svn.open-ils.org
Wed Jun 2 23:39:19 EDT 2010


Author: dbs
Date: 2010-06-02 23:39:16 -0400 (Wed, 02 Jun 2010)
New Revision: 16570

Modified:
   trunk/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm
Log:
< is not >; get our time-to-live threshold comparison correct

Also add a useful log entry to differentiate this not-active-request reason from the others


Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm	2010-06-03 03:15:38 UTC (rev 16569)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm	2010-06-03 03:39:16 UTC (rev 16570)
@@ -3877,8 +3877,9 @@
     # Ensure we're still within the TTL for the request
     my $aupr_ttl = $U->ou_ancestor_setting_value($user->home_ou, 'circ.password_reset_request_time_to_live') || 24*60*60;
     my $threshold = DateTime::Format::ISO8601->parse_datetime(clense_ISO8601($aupr->[0]->request_time))->add(seconds => $aupr_ttl);
-    if ($threshold > DateTime->now(time_zone => 'local')) {
+    if ($threshold < DateTime->now(time_zone => 'local')) {
         $e->die_event;
+        $logger->info("Password reset request needed to be submitted before $threshold");
         return OpenILS::Event->new('PATRON_NOT_AN_ACTIVE_PASSWORD_RESET_REQUEST');
     }
 



More information about the open-ils-commits mailing list