Currently email/username is case-dependent. So for example, it's not possible to log in with KNUTole@systemapic.com, because the checks are case-dependent.
This is unnecessary, and all usernames/emails should be converted to lowercase at all times.
[x] .toLowerCase() when registering user (both email and username)
[x] .toLowerCase() when checking for unique username/email
[x] .toLowerCase() when searching for users on server (ie. every User.findOne() lookup)
[x] add tests
[ ] script to convert all existing user's usernames/emails to lowercase (@knutole)
Currently email/username is case-dependent. So for example, it's not possible to log in with KNUTole@systemapic.com, because the checks are case-dependent.
This is unnecessary, and all usernames/emails should be converted to lowercase at all times.
.toLowerCase()
when registering user (both email and username).toLowerCase()
when checking for unique username/email.toLowerCase()
when searching for users on server (ie. everyUser.findOne()
lookup)