Ensure lowercasing the email
This commit is contained in:
@@ -264,8 +264,10 @@ function verifyWithEmail(email, password, callback) {
|
||||
assert.strictEqual(typeof password, 'string');
|
||||
assert.strictEqual(typeof callback, 'function');
|
||||
|
||||
email = email.toLowerCase();
|
||||
|
||||
function checkWithEmailFromDatabase() {
|
||||
userdb.getByEmail(email.toLowerCase(), function (error, user) {
|
||||
userdb.getByEmail(email, function (error, user) {
|
||||
if (error && error.reason == DatabaseError.NOT_FOUND) return callback(new UserError(UserError.NOT_FOUND));
|
||||
if (error) return callback(new UserError(UserError.INTERNAL_ERROR, error));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user