diff --git a/src/controllers/authentication.js b/src/controllers/authentication.js index 8c952a0503..8aa609a32a 100644 --- a/src/controllers/authentication.js +++ b/src/controllers/authentication.js @@ -44,7 +44,7 @@ authenticationController.register = function (req, res) { err = '[[error:invalid-email]]'; } - if (!err && !userData.username || userData.username.length < meta.config.minimumUsernameLength) { + if (!err && (!userData.username || userData.username.length < meta.config.minimumUsernameLength)) { err = '[[error:username-too-short]]'; }