diff --git a/actions/challengeRegistration.js b/actions/challengeRegistration.js index 4072e1b38..791121d3f 100644 --- a/actions/challengeRegistration.js +++ b/actions/challengeRegistration.js @@ -874,7 +874,7 @@ exports.registerChallenge = { var fail = err || inactive; if (fail) cb(fail); else api.dataAccess.executeQuery('check_challenge_exists', {challengeId: challengeId}, connection.dbConnectionMap, cb); - }); + }, "You must activate your account in order to participate. Please check your e-mail in order to complete the activation process, or contact support@topcoder.com if you did not receive an e-mail."); } }, function (result, cb) { if (result.length > 0) { diff --git a/initializers/helper.js b/initializers/helper.js index 466d970b1..198a9f05d 100644 --- a/initializers/helper.js +++ b/initializers/helper.js @@ -1625,7 +1625,7 @@ helper.checkUserExists = function (handle, api, dbConnectionMap, callback) { * @param {Object} dbConnectionMap - the database connection map * @param {Function} callback - the callback function */ -helper.checkUserActivated = function (handle, api, dbConnectionMap, callback) { +helper.checkUserActivated = function (handle, api, dbConnectionMap, callback, textResponse) { api.dataAccess.executeQuery('check_user_activated', { handle: handle }, dbConnectionMap, function (err, result) { if (err) { callback(err, null); @@ -1634,7 +1634,8 @@ helper.checkUserActivated = function (handle, api, dbConnectionMap, callback) { if (result && result[0] && result[0].status === 'A') { callback(err, null); } else { - callback(err, new BadRequestError('User is not activated.')); + var message = textResponse || 'User is not activated.'; + callback(err, new BadRequestError(message)); } }); };