<?php

class Admin_model extends CI_Model {
	function __construct()
	{
		
   }

   public function verify_user($email, $password)
   {
      $q = $this
            ->db
            ->where('email_address', $email)
            ->limit(1)
            ->get('users');
     
      if ( $q->num_rows > 0 ) {
         $result = $q->row();
         $this->load->library('password');
         
         //Make sure the hashes match.
         if($this->password->check_password($password, $result->password)){
          return $result;
         }  
      }
      return false;
   }
  
  
}

