Closed tasmanwebsolutions closed 10 years ago
You're going to need to go into more detail about what isn't working.
Your user model has a heap of superfluous code:
public function getUser($username) {
$username = $this->input->post('username');
$this->db->where('username', $this->input->post('username'));
$this->db->get('user');
}
You already passed the $username
in through the method parameters. You don't need to fetch it from the input (which you do, twice) and you shouldn't do that from the model anyway.
None of your methods in the model return anything (probably one of your biggest problems).
I'm not sure this line is going to work (I could be wrong, haven't used CI in a while):
$this->CI->load->database();
Perhaps it should be:
$this->CI->load->library('database');
So yeah, there's a lot going on here that isn't right. But I'm not convinced this has anything to do with this library.
Thanks any way but giving up on it spent couple weeks trying to work it out.
Hi, Matthew here. I have been trying to get your codeigniter bcrypt correct but not having much luck. Can you give me some advice. Cheers I have got the hashing part on my register model and its now stored in database user
Controller Login
Model
Library File Users