From 4445c32b4c515c11df8ab7c1a2301f17582d5213 Mon Sep 17 00:00:00 2001 From: dbs Date: Thu, 3 Jun 2010 03:39:16 +0000 Subject: [PATCH] < 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 git-svn-id: svn://svn.open-ils.org/ILS/trunk@16570 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/OpenILS/Application/Actor.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm b/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm index 061122fc7d..4a347ba119 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm @@ -3877,8 +3877,9 @@ sub commit_password_reset { # 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'); } -- 2.43.2