fix usernames should be saved lowercased

This commit is contained in:
Berkeley Martinez
2015-06-10 15:22:57 -07:00
parent 996c3e7816
commit bdb7d40548
3 changed files with 5 additions and 8 deletions

View File

@ -212,7 +212,8 @@ var passportOptions = {
emails[0].value :
null;
var username = profile.username || profile.id;
var username = (profile.username || profile.id);
username = typeof username === 'string' ? username.toLowerCase() : username;
var password = generateKey('password');
var userObj = {
username: username,