Welcome Guest, Not a member yet? Register   Sign In
Callback "Password Check" Problem...
#3

[eluser]Ortonruk[/eluser]
Hi Josh

Thanks for the quick response. Yes _salt has been defined at the top of the controller - should of clarified that sorry.

I will try echoing out the variable now, thanks for the tip Smile


Edit: Ok, bare with me as I am pretty new to CI. I changed the query (see below) to echo out _password when the form is posted. So now the problem appears to be that the hash is not the same as the one stored in my database, even though the passwords in plain text are identical.
I just checked over my register() function to make sure that it was posting the password from the signup form correctly and that appears to be fine too.

Code:
function password_check()
{
    $this->db->where('email', $this->_email);
    $query = $this->db->get('users');
    $result = $query->row_array();
            
    if($query->num_rows() > 0)
    {
        $this->form_validation->set_message('password_check', 'Invalid email/password.');
        echo $this->_password;
        return FALSE;
    }
            
    if($result['password'] == $this->_password);
    {
        return TRUE;
    }
}


Messages In This Thread
Callback "Password Check" Problem... - by El Forum - 02-15-2011, 08:28 AM
Callback "Password Check" Problem... - by El Forum - 02-15-2011, 09:18 AM
Callback "Password Check" Problem... - by El Forum - 02-15-2011, 09:22 AM
Callback "Password Check" Problem... - by El Forum - 02-15-2011, 10:14 AM
Callback "Password Check" Problem... - by El Forum - 02-15-2011, 10:19 AM
Callback "Password Check" Problem... - by El Forum - 02-15-2011, 10:31 AM
Callback "Password Check" Problem... - by El Forum - 02-15-2011, 10:39 AM
Callback "Password Check" Problem... - by El Forum - 02-15-2011, 11:06 AM
Callback "Password Check" Problem... - by El Forum - 02-15-2011, 11:17 AM
Callback "Password Check" Problem... - by El Forum - 02-15-2011, 11:34 AM
Callback "Password Check" Problem... - by El Forum - 02-15-2011, 11:40 AM
Callback "Password Check" Problem... - by El Forum - 02-15-2011, 11:45 AM
Callback "Password Check" Problem... - by El Forum - 02-15-2011, 12:22 PM
Callback "Password Check" Problem... - by El Forum - 02-15-2011, 12:36 PM
Callback "Password Check" Problem... - by El Forum - 02-15-2011, 01:22 PM
Callback "Password Check" Problem... - by El Forum - 02-15-2011, 02:59 PM
Callback "Password Check" Problem... - by El Forum - 04-16-2011, 02:26 PM
Callback "Password Check" Problem... - by El Forum - 04-16-2011, 03:22 PM



Theme © iAndrew 2016 - Forum software by © MyBB