Added case-insensitive logins
This commit is contained in:
parent
eadfa7c126
commit
9bf68a499b
2 changed files with 2 additions and 2 deletions
|
|
@ -253,7 +253,7 @@ userSchema.statics.authenticate = async function(user, pass, failLine = "Bad Use
|
|||
}
|
||||
|
||||
//get the user if it exists
|
||||
const userDB = await this.findOne({ user });
|
||||
const userDB = await this.findOne({ user: new RegExp(user, 'i')});
|
||||
|
||||
//if not scream and shout
|
||||
if(!userDB){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue