saintedlama/passport-local-mongoose — pull request #26 by pascal-bach (2013-12-05 21:07:22+00:00)
Title: Don't throw an error if the user has no username set.

If the User object with a custom username gets saved, but no username is set an exception is thrown.
This changes checks first if username is not undefined before it calls the toLowerCase method.