Login with Ion Auth and Username and Email
1 answer
You have your first ion_auth_model function and search in ion_auth_model and you will see this line.
$query = $this->db->select($this->identity_column .", ".$extraSelect.', email, id, password,active, last_login')
Add username to this line
$query = $this->db->select($this->identity_column .", ".$extraSelect.', username, email, id, password,active, last_login')
After that add the clause or_where ()
->where($this->identity_column, $identity)
->or_where('username',$identity)
->limit(1)
->order_by('id', 'desc')
->get($this->tables['users']);
+4
source to share