Recovery email is case sensitive
berwyn opened this issue · comments
When trying to recover the password for an account, the email field is case sensitive (e.g. vanacus@gmail and Vanacus@gmail are not considered the same). The restorations controller should probably just check the downcase of the stored email and the entered email for comparison rather than a direct string relation.
The login email is case sensitive as well I spent a while on my phone wondering why it wouldn't let me in because it was capitalising the first letter. it isn't a big problem but would make sense to change.
I'm pretty sure I can get this fixed. I'll test it out today
Its an easy fix. In MongoDB you can do regular expression queries so just use the i
flag like /lisinge/i
.
Like:
@user = User.where(email: /#{params[:email]}/i).first