[Solved] How can I make a registered user’s encrypted password be accepted as the normal password when logging in? [closed]


Depending upon what hashing you are using to store the password, your model confitions would be something like this:

$this->db->select('*')->from('membership');
$this->db->where('username', $username);
$this->db->where('password', MD5($password));

Also, there is a bug in your model for checking if a user is valid. If number of rows returned from DB is 1, then the user is valid, otherwise not.

if ($query->num_rows == 1)
    {
        return true;
    }

else
{
    $this->form_validation->set_message('validateUser', 'Invalid username/password');
    return false;
}

6

solved How can I make a registered user’s encrypted password be accepted as the normal password when logging in? [closed]