From 906ccf02e41e155653209aa2bff6ca9ac236056e Mon Sep 17 00:00:00 2001 From: REJack Date: Sat, 14 May 2016 20:32:44 +0200 Subject: [PATCH] changed config var name from `max_login_attempt_per_minutes` to `max_login_attempt_time_period` changed default config var value for `max_login_attempt_per_minutes` removed config info line from removed `update_last_login_attempt` config var --- application/config/aauth.php | 5 ++--- application/libraries/Aauth.php | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/application/config/aauth.php b/application/config/aauth.php index fd9a1bb..7842d80 100644 --- a/application/config/aauth.php +++ b/application/config/aauth.php @@ -52,8 +52,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); | ['totp_reset_over_reset_password'] TOTP reset over reset Password | | ['max_login_attempt'] Login attempts time interval (default 10 times in one hour) -| ['max_login_attempt_per_minutes'] Max Login attempts per Minute (default 5) -| ['update_last_login_attempt'] Update last Login attempt on login (default false) +| ['max_login_attempt_time_period'] Period of time for max login attempts (default "5 minutes") | | ['login_with_name'] Login Identificator, if TRUE username needed to login else email address. | @@ -114,7 +113,7 @@ $config_aauth["default"] = array( 'totp_reset_over_reset_password' => false, 'max_login_attempt' => 10, - 'max_login_attempt_per_minutes' => 5, + 'max_login_attempt_time_period' => "5 minutes", 'login_with_name' => false, diff --git a/application/libraries/Aauth.php b/application/libraries/Aauth.php index f3d5456..625ecbc 100644 --- a/application/libraries/Aauth.php +++ b/application/libraries/Aauth.php @@ -638,7 +638,7 @@ class Aauth { $data = array(); $data['last_login_attempt'] = date("Y-m-d H:i:s"); - if (strtotime($row->last_login_attempt) > strtotime("-".$this->config_vars['max_login_attempt_per_minutes'])) { + if (strtotime($row->last_login_attempt) > strtotime("-".$this->config_vars['max_login_attempt_time_period'])) { $data['login_attempts'] = $row->login_attempts + 1; } else { $data['login_attempts'] = 1;