So you change identity to username, then try to login with username=admin and you get a login error.
Make sure the username is set in the DB. You might have to throw some debug code in ion_auth_model->login()...[/quote]
Yes that is correct. I changed the config to 'username' and attempted to login in the default auth/login screen. Assuming everything is at default, do I have to change anything? Am I supposed to make my own login controller/view to accommodate switching the identity? Not sure what you mean by making sure the username is set in the DB. Im trying to retrieve the default 'administrator' row of the DB.
Also I created a function to get user by username in the ion_auth_model and it isnt returning an object. I basically copied the get_user_by_email function verbatim. Can anyone tell me why this doesnt work?
Code:
public function get_user_by_username($username)
{
$this->db->where($this->tables['users'].'.username', $username);
$this->db->limit(1);