Created
December 31, 2012 18:51
-
-
Save jblac/4421954 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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