From 76fe1f2bf1a1f802ae969eeaab7ff030dc0d9238 Mon Sep 17 00:00:00 2001 From: Evert Prants Date: Sun, 8 Sep 2019 18:52:12 +0300 Subject: [PATCH] clarify some messages --- server/routes/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/routes/index.js b/server/routes/index.js index 8354394..a66e5d6 100644 --- a/server/routes/index.js +++ b/server/routes/index.js @@ -412,9 +412,9 @@ router.post('/login', accountLimiter, csrfValidation, wrap(async (req, res, next let pwMatch = await API.User.Login.password(user, req.body.password) if (!pwMatch) return formError(req, res, 'Invalid username or password.') - if (user.activated === 0) return formError(req, res, 'Please activate your account first.') + if (user.activated === 0) return formError(req, res, 'Please activate your account first. If you did not receive an email, please contact an administrator.') - if (user.locked === 1) return formError(req, res, 'This account has been locked.') + if (user.locked === 1) return formError(req, res, 'This account has been locked. Please contact an administrator for more information.') // Check if the user is banned let banStatus = await API.User.getBanStatus(user.id) @@ -588,7 +588,7 @@ router.post('/register', accountLimiter, csrfValidation, wrap(async (req, res, n // Do not include activation link message when the user is already activated let registerMessage = 'Account created successfully!' - if (newUser.user && newUser.user.activated !== 1) { + if (newUser && newUser.activated !== 1) { registerMessage += ' Please check your inbox for an activation link. Also, make sure to look into spam folders.' }