clarify some messages

This commit is contained in:
Evert Prants 2019-09-08 18:52:12 +03:00
parent ddbe439bc3
commit 76fe1f2bf1
Signed by: evert
GPG Key ID: 1688DA83D222D0B5

View File

@ -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.'
}