php - Can't locate file -



php - Can't locate file -

after working files , trying figured out still have issue somewhere. saying unable locate model specified login attempts. modeling own thing against tank library. there’s ideas i’m using coding own needs.

libraries/kow_auth.php

<?php if (!defined('basepath')) exit('no direct script access allowed'); /** * kow auth library * authentication library code igniter * @author jeffrey davidson * @version 1.0.0 * @copyright 2012 */ class kow_auth { protected $ci; function __construct() { //assign ci superglobal $ci $this->ci =& get_instance(); } function is_max_login_attempts_exceeded($user_id) { $this->ci->load->model('kow_auth/login_attempts'); homecoming $this->ci->login_attempts->get_attempts_num($user_id) >= 5; } } ?>

models/kow_auth/login_attempts

<?php if (!defined('basepath')) exit('no direct script access allowed'); /** * login_attempts * * model serves watch on attempts login on site * (to protect site brute-force attack user database) * * @package kow_auth * @author jeffrey davidson */ class login_attempts extends ci_model { function __construct() { parent::__construct(); } function get_attempts_num($user_id) { $this->db->select('failed_attempts'); $this->db->where('user_id', $user_id); $query = $this->db->get('users_logins'); if ($query->num_rows() > 0) { $row = $query->row(); homecoming $row->failed_attempts; } else { homecoming false; } } }

the code looks right. things sense pay attending names. based on code model should reside in file:

models/kow_auth/login_attempts.php

with lower-case folder name.

php codeigniter

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -