We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
public function throttle($type = 0, $limit = 10, $timeout = 30) { //clean up login attempts older than specified time $this->throttle_cleanup($timeout, $type, $timeout); $data = new stdClass(); $data->ip = $this->CI->input->ip_address(); $data->type = $type; $this->CI->throttle_model->insert($data); $attempts = $this->CI->throttle_model->where(['ip' => $this->CI->input->ip_address(), 'type' => $type])->count_rows(); if ($attempts > $limit) { show_error('Too many attempts. Try back after ' . $timeout . ' minutes.', 503, 'Attempt failed'); } return $attempts; // return current number of attempted logins }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The text was updated successfully, but these errors were encountered: