Skip to content

Instantly share code, notes, and snippets.

@andyhawthorne
Created October 17, 2012 07:36
Show Gist options
  • Select an option

  • Save andyhawthorne/3904239 to your computer and use it in GitHub Desktop.

Select an option

Save andyhawthorne/3904239 to your computer and use it in GitHub Desktop.
HMVC4
<?php
class Admin_model extends CI_Model
{
function __construct()
{
parent:: __construct();
}
public function verify_user($email, $password)
{
$q = $this->db->where('email_address', $email)
->where('password', sha1($password))
->limit(1)
->get('users');
if ( $q->num_rows > 0 )
{
return $q->row();
}
return false;
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment