diff --git a/server/api/controller/user.js b/server/api/controller/user.js index 876c9b0d..1f218ed3 100644 --- a/server/api/controller/user.js +++ b/server/api/controller/user.js @@ -11,7 +11,7 @@ const userController = { async forgotPassword (req, res) { const email = req.body.email - const user = await User.findOne({ where: { email: { [Op.eq]: email } } }) + const user = await User.findOne({ where: { email, is_active: true } }) if (!user) { return res.sendStatus(200) } user.recover_code = crypto.randomBytes(16).toString('hex')