<?php if (!defined('BASEPATH')) exit('No direct script access allowed');

class Login_Model extends CI_Model {

	public function __construct() {

	}

	public function login_user() {

		 $condition = array(
            'Username'    => $this->input->post('username'),
            'Password'  =>  $this->input->post('password'),
            'Status' => 'Y'
        );

        $this->db->where($condition);
        $this->db->limit(1);

        $q = $this->db->get('user');

        return $q->num_rows() > 0 ? $q->row() : false;
	}
}