Skip to content

Instantly share code, notes, and snippets.

@jblac
Created December 31, 2012 18:51
Show Gist options
  • Save jblac/4421954 to your computer and use it in GitHub Desktop.
Save jblac/4421954 to your computer and use it in GitHub Desktop.
<?php
/**
* Date: 12/31/12
* Time: 9:36AM
* Model corresponding to all actions one can take on a users account.
*/
class bm_users extends CI_Model {
function login($data) {
$this->db->select()->from('users')->where(array('username' => $data['username'], 'password' => sha1($data['password']), 'userStatus' => '1'));
$query = $this->db->get();
if ($query->num_rows()) {
return $query->first_row('array');
} else {
return 'failed';
}
}
function logout() {
}
function change_pass() {
}
function forgot_pass() {
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment