Browse Source

Bug fix: email reset was now lower casing the entered email.

Lee Morgan 5 năm trước cách đây
mục cha
commit
0ad8e18901
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      controllers/passwordReset.js

+ 1 - 1
controllers/passwordReset.js

@@ -12,7 +12,7 @@ module.exports = {
     },
 
     generateCode: function(req, res){
-        Merchant.findOne({email: req.body.email})
+        Merchant.findOne({email: req.body.email.toLowerCase()})
             .then((merchant)=>{
                 if(merchant === null){
                     req.session.error = "USER WITH THIS EMAIL DOES NOT EXIST";