saintedlama/passport-local-mongoose — pull request #16 by techjeffharris (2013-08-20 05:04:52+00:00)
Title: Optionally convert username to lowercase before find

Given that:
* I am using email addresses for usernames
* email addresses are generally case-insensitive (or converted to upper/lower case)
* I use the lowercase option on my schema to convert usernames
* I want my users to be able to neurotically mix upper and lowercase letters in their email addresses when logging in

I have made these changes:
* created `options.usernameLowerCase` which defaults to `false`
* if `options.usernameLowerCase` is `true`, convert username to lowercase in `schema.statics.findByUsername`.