I know I can set ion auth to login by username in the config, I also know I can set it to login by email in the config.
Is there a simple way to set it it to use either automatically?
I know I can set ion auth to login by username in the config, I also know I can set it to login by email in the config.
Is there a simple way to set it it to use either automatically?
use 'email' in 'identity' ion_auth config then add this code after $query in ion_auth_model line 866
Its possible with only a few code rows: Lets assume that this is your ion_auth config file:
you have to run the login function twice. If the first try (with username) didn't success, you can change the identifier and retry:
$this->ion_auth_model->identity_column = "email";
No modifications in model or library or custom querys neccesary