From cf53d3592b78698af75cfe6f73708c74e5c220f5 Mon Sep 17 00:00:00 2001 From: Anderson Salas <6117373+andersonsalas@users.noreply.github.com> Date: Tue, 4 Sep 2018 10:14:49 -0400 Subject: [PATCH] Fix #30 --- src/Auth/SimpleAuth/Controller.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Auth/SimpleAuth/Controller.php b/src/Auth/SimpleAuth/Controller.php index 6f2dc1f..c2c2efd 100644 --- a/src/Auth/SimpleAuth/Controller.php +++ b/src/Auth/SimpleAuth/Controller.php @@ -469,8 +469,8 @@ public function passwordReset() // this email address (max 3 within 2 hours) $requestCount = $this->db->where('email', $this->input->post('email')) - ->where('created_at >=', date('Y-m-d H:i:s')) - ->where('created_at <=', date('Y-m-d H:i:s', time() + (60 * 60 * 2))) // 2 hours + ->where('created_at <=', date('Y-m-d H:i:s')) + ->where('created_at >=', date('Y-m-d H:i:s', time() - (60 * 60 * 2))) // 2 hours ->count_all_results(config_item('simpleauth_password_resets_table')); Debug::log('Password reset count for this email: ' . $requestCount, 'info', 'auth');