benedmunds/CodeIgniter-Ion-Auth — Issue #116: Forgot password issues when using username as identity
Author: jakemac53
Created: 2011-10-21 18:24:36+00:00
State: open

When using the username as the identity instead of email, then the email does not have to be unique. This is all fine and dandy but then the forgot password function in the model doesn't use the username to pull the user, but instead the email. This is no longer guaranteed to be a single result. Currently the model does check for $return = $this->db->affected_rows() == 1; and simply errors out. Therefore if the emails are not unique you cannot ever send a forgotten password link.

I am not sure what a good solution for this is, since you wouldn't want to send an email if the email isn't unique to the user.... but I think the issue should be addressed and possibly the email should just be required to be unique even when using the username as the identity.