Ah ok.  I really don't like doing any direct db work in the controller.  What do you think about changing both of those (mongo and relational db) to just using something like this:

$identity = $this->ion_auth->where('email', strtolower($this->input->post('email')))->users()->row();


and then we will need to lowercase the emails on registration.  I'm not sure if I care that much about casing for the example though.  Thoughts?